// NewHomesteadInstructionSet returns the frontier and homestead
// instructions that can be executed during the homestead phase.
183299
func newHomesteadInstructionSet() [256]operation {
	instructionSet := newFrontierInstructionSet()
	instructionSet[DELEGATECALL] = operation{
		execute:    opDelegateCall,
		dynamicGas: gasDelegateCall,
		minStack:   minStack(6, 1),
		maxStack:   maxStack(6, 1),
		memorySize: memoryDelegateCall,
		valid:      true,
		returns:    true,
	}
	return instructionSet
}
121081
func (s *DescribeConfigurationSetOutput) SetConfigurationSet(v *ConfigurationSet) *DescribeConfigurationSetOutput {
	s.ConfigurationSet = v
	return s
}
1288131
func (exp *explorerUI) NextHome(w http.ResponseWriter, r *http.Request) {
	// Get top N blocks and trim each block to have just the fields required for
	// this page.
	height, err := exp.blockData.GetHeight()
	if err != nil {
		log.Errorf("GetHeight failed: %v", err)
		exp.StatusPage(w, defaultErrorCode, defaultErrorMessage, "",
			ExpStatusError)
		return
	}
	blocks := exp.blockData.GetExplorerFullBlocks(int(height),
		int(height)-homePageBlocksMaxCount)

	// trim unwanted data in each block
	trimmedBlocks := make([]*types.TrimmedBlockInfo, 0, len(blocks))
	for _, block := range blocks {
		trimmedBlock := &types.TrimmedBlockInfo{
			Time:         block.BlockTime,
			Height:       block.Height,
			Total:        block.TotalSent,
			Fees:         block.MiningFee,
			Subsidy:      block.Subsidy,
			Votes:        block.Votes,
			Tickets:      block.Tickets,
			Revocations:  block.Revs,
			Transactions: types.FilterRegularTx(block.Tx),
		}

		trimmedBlocks = append(trimmedBlocks, trimmedBlock)
	}

	// Construct the required TrimmedMempoolInfo from the shared inventory.
	inv := exp.MempoolInventory()
	mempoolInfo := inv.Trim() // Trim internally locks the MempoolInfo.

	exp.pageData.RLock()
	mempoolInfo.Subsidy = exp.pageData.HomeInfo.NBlockSubsidy

	str, err := exp.templates.execTemplateToString("nexthome", struct {
		*CommonPageData
		Info    *types.HomeInfo
		Mempool *types.TrimmedMempoolInfo
		Blocks  []*types.TrimmedBlockInfo
	}{
		CommonPageData: exp.commonData(r),
		Info:           exp.pageData.HomeInfo,
		Mempool:        mempoolInfo,
		Blocks:         trimmedBlocks,
	})

	exp.pageData.RUnlock()

	if err != nil {
		log.Errorf("Template execute failure: %v", err)
		exp.StatusPage(w, defaultErrorCode, defaultErrorMessage, "", ExpStatusError)
		return
	}
	w.Header().Set("Content-Type", "text/html")
	w.WriteHeader(http.StatusOK)
	io.WriteString(w, str)
}
353588
func NewLayerReader(path string, parentLayerPaths []string) (LayerReader, error) {
	exportPath, err := ioutil.TempDir("", "hcs")
	if err != nil {
		return nil, err
	}
	err = ExportLayer(path, exportPath, parentLayerPaths)
	if err != nil {
		os.RemoveAll(exportPath)
		return nil, err
	}
	return &legacyLayerReaderWrapper{newLegacyLayerReader(exportPath)}, nil
}
294146
func interfaceMethodSet(t types.Type) []*rawMethod {
	if t == nil {
		return nil
	}
	var result []*rawMethod
	methods := typeutil.IntuitiveMethodSet(t, nil)
	for i := range methods {
		if methods[i].Obj() == nil || methods[i].Type() == nil {
			continue
		}
		fun, ok := methods[i].Obj().(*types.Func)
		if !ok {
			continue
		}
		sig, ok := methods[i].Type().(*types.Signature)
		if !ok {
			continue
		}
		result = append(result, &rawMethod{
			Func:      fun,
			Signature: sig,
		})
	}

	return result
}
1135653
func newStructDef(apiDef *raml.APIDefinition, name, packageName, description string, properties map[string]interface{}) structDef {
	// generate struct's fields from type properties
	fields := make(map[string]fieldDef)
	for k, v := range properties {
		prop := raml.ToProperty(k, v)
		fields[prop.Name] = newFieldDef(apiDef, name, prop, packageName)
	}
	return structDef{
		Name:        strings.Title(commons.NormalizeIdentifier(name)),
		PackageName: packageName,
		Fields:      fields,
		Description: commons.ParseDescription(description),
	}
}
113951
func NewMethods(in interface{}, context *compiler.Context) (*Methods, error) {
	errors := make([]error, 0)
	x := &Methods{}
	m, ok := compiler.UnpackMap(in)
	if !ok {
		message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
		errors = append(errors, compiler.NewError(context, message))
	} else {
		// repeated NamedMethod additional_properties = 1;
		// MAP: Method
		x.AdditionalProperties = make([]*NamedMethod, 0)
		for _, item := range m {
			k, ok := compiler.StringValue(item.Key)
			if ok {
				v := item.Value
				pair := &NamedMethod{}
				pair.Name = k
				var err error
				pair.Value, err = NewMethod(v, compiler.NewContext(k, context))
				if err != nil {
					errors = append(errors, err)
				}
				x.AdditionalProperties = append(x.AdditionalProperties, pair)
			}
		}
	}
	return x, compiler.NewErrorGroupOrNil(errors)
}
883533
func NewWordSet(a ...string) WordSet {
	s := make(WordSet)
	for _, i := range a {
		s.Add(i)
	}
	return s
}
1327029
func NewForConfigOrDie(c *rest.Config) *Clientset {
	var cs Clientset
	cs.project = projectinternalversion.NewForConfigOrDie(c)

	cs.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
	return &cs
}
269574
func packageMethodSet(p *packages.Package) []*rawMethod {
	if p == nil || p.Types == nil || p.Types.Scope() == nil {
		return nil
	}
	var result []*rawMethod
	scope := p.Types.Scope()
	for _, name := range scope.Names() {
		obj := scope.Lookup(name)
		if !obj.Exported() {
			continue // skip unexported names
		}
		fun, ok := obj.(*types.Func)
		if !ok {
			continue
		}
		sig, ok := obj.Type().(*types.Signature)
		if !ok {
			continue
		}
		result = append(result, &rawMethod{
			Func:      fun,
			Signature: sig,
		})
	}

	return result
}
698560
func NewNBReader(reader io.Reader, blockSize int, options ...Option) *NBReader {
	dataChan := make(chan []byte)
	r := NBReader{reader: reader, dataChan: dataChan, blockSize: blockSize}
	for _, option := range options {
		option(&r)
	}
	go r.readInput()
	return &r
}
938131
func NewNativeJSONDecoder(r io.Reader) JSONDecoder {
	return &jsonDecoder{
		r:  r,
		bo: NativeEndian,
	}
}
1308957
func (s *ScalingPlan) SetScalingInstructions(v []*ScalingInstruction) *ScalingPlan {
	s.ScalingInstructions = v
	return s
}
238687
func NewByteReader(buf []byte) (reader *ByteReader) {
	reader = new(ByteReader)
	reader.buf = buf
	return
}
1323533
func (t *Table) SetHeader(keys []string) {
	t.colSize = len(keys)
	for i, v := range keys {
		lines := t.parseDimension(v, i, headerRowIdx)
		t.headers = append(t.headers, lines)
	}
}
717146
func New(values ...interface{}) *Set {
	// Initialize set
	s := Set{
		m: make(map[interface{}]struct{}),
	}

	// If items are specified in the initializer, immediately add them to the set
	for _, v := range values {
		s.Add(v)
	}

	return &s
}
638831
func (F *Frisby) SetHeaders(headers map[string]string) *Frisby {
	if F.Req.Headers == nil {
		F.Req.Headers = make(map[string]string)
	}
	for key, value := range headers {
		F.Req.Headers[key] = value
	}
	return F
}