HObjectAccess access = HObjectAccess::ForAllocationSiteOffset(
AllocationSite::kTransitionInfoOffset);
- HInstruction* boilerplate = Add<HLoadNamedField>(allocation_site, access);
+ HInstruction* boilerplate = Add<HLoadNamedField>(
+ allocation_site, static_cast<HValue*>(NULL), access);
HValue* push_value;
if (mode == FastCloneShallowArrayStub::CLONE_ANY_ELEMENTS) {
HValue* elements = AddLoadElements(boilerplate);
HObjectAccess access = HObjectAccess::ForAllocationSiteOffset(
AllocationSite::kTransitionInfoOffset);
- HInstruction* boilerplate = Add<HLoadNamedField>(allocation_site, access);
+ HInstruction* boilerplate = Add<HLoadNamedField>(
+ allocation_site, static_cast<HValue*>(NULL), access);
int size = JSObject::kHeaderSize + casted_stub()->length() * kPointerSize;
int object_size = size;
}
HValue* boilerplate_map = Add<HLoadNamedField>(
- boilerplate, HObjectAccess::ForMap());
+ boilerplate, static_cast<HValue*>(NULL),
+ HObjectAccess::ForMap());
HValue* boilerplate_size = Add<HLoadNamedField>(
- boilerplate_map, HObjectAccess::ForMapInstanceSize());
+ boilerplate_map, static_cast<HValue*>(NULL),
+ HObjectAccess::ForMapInstanceSize());
HValue* size_in_words = Add<HConstant>(object_size >> kPointerSizeLog2);
checker.If<HCompareNumericAndBranch>(boilerplate_size,
size_in_words, Token::EQ);
NOT_TENURED, JS_OBJECT_TYPE);
for (int i = 0; i < object_size; i += kPointerSize) {
- HObjectAccess access = HObjectAccess::ForJSObjectOffset(i);
- Add<HStoreNamedField>(object, access,
- Add<HLoadNamedField>(boilerplate, access));
+ HObjectAccess access = HObjectAccess::ForObservableJSObjectOffset(i);
+ Add<HStoreNamedField>(
+ object, access, Add<HLoadNamedField>(
+ boilerplate, static_cast<HValue*>(NULL), access));
}
ASSERT(FLAG_allocation_site_pretenuring || (size == object_size));
// Link the object to the allocation site list
HValue* site_list = Add<HConstant>(
ExternalReference::allocation_sites_list_address(isolate()));
- HValue* site = Add<HLoadNamedField>(site_list,
- HObjectAccess::ForAllocationSiteList());
+ HValue* site = Add<HLoadNamedField>(
+ site_list, static_cast<HValue*>(NULL),
+ HObjectAccess::ForAllocationSiteList());
store = Add<HStoreNamedField>(object,
HObjectAccess::ForAllocationSiteOffset(AllocationSite::kWeakNextOffset),
site);
template<>
HValue* CodeStubGraphBuilder<LoadFieldStub>::BuildCodeStub() {
Representation rep = casted_stub()->representation();
+ int offset = casted_stub()->offset();
HObjectAccess access = casted_stub()->is_inobject() ?
- HObjectAccess::ForJSObjectOffset(casted_stub()->offset(), rep) :
- HObjectAccess::ForBackingStoreOffset(casted_stub()->offset(), rep);
+ HObjectAccess::ForObservableJSObjectOffset(offset, rep) :
+ HObjectAccess::ForBackingStoreOffset(offset, rep);
return AddLoadNamedField(GetParameter(0), access);
}
template<>
HValue* CodeStubGraphBuilder<KeyedLoadFieldStub>::BuildCodeStub() {
Representation rep = casted_stub()->representation();
+ int offset = casted_stub()->offset();
HObjectAccess access = casted_stub()->is_inobject() ?
- HObjectAccess::ForJSObjectOffset(casted_stub()->offset(), rep) :
- HObjectAccess::ForBackingStoreOffset(casted_stub()->offset(), rep);
+ HObjectAccess::ForObservableJSObjectOffset(offset, rep) :
+ HObjectAccess::ForBackingStoreOffset(offset, rep);
return AddLoadNamedField(GetParameter(0), access);
}
}
-template<>
-HValue* CodeStubGraphBuilder<KeyedArrayCallStub>::BuildCodeStub() {
- int argc = casted_stub()->argc() + 1;
- info()->set_parameter_count(argc);
-
- HValue* receiver = Add<HParameter>(1);
- BuildCheckHeapObject(receiver);
-
- // Load the expected initial array map from the context.
- JSArrayBuilder array_builder(this, casted_stub()->elements_kind());
- HValue* map = array_builder.EmitMapCode();
-
- HValue* checked_receiver = Add<HCheckMapValue>(receiver, map);
-
- HValue* function = BuildUncheckedMonomorphicElementAccess(
- checked_receiver, GetParameter(0),
- NULL, true, casted_stub()->elements_kind(),
- false, NEVER_RETURN_HOLE, STANDARD_STORE);
- return Add<HCallFunction>(function, argc, TAIL_CALL);
-}
-
-
-Handle<Code> KeyedArrayCallStub::GenerateCode(Isolate* isolate) {
- return DoGenerateCode(isolate, this);
-}
-
-
template <>
HValue* CodeStubGraphBuilder<KeyedStoreFastElementStub>::BuildCodeStub() {
BuildUncheckedMonomorphicElementAccess(
HValue* cell = Add<HConstant>(placeholder_cell);
HObjectAccess access(HObjectAccess::ForCellPayload(isolate()));
- HValue* cell_contents = Add<HLoadNamedField>(cell, access);
+ HValue* cell_contents = Add<HLoadNamedField>(
+ cell, static_cast<HValue*>(NULL), access);
if (stub->is_constant()) {
IfBuilder builder(this);
Add<HStoreCodeEntry>(js_function, code_object);
// Now link a function into a list of optimized functions.
- HValue* optimized_functions_list = Add<HLoadNamedField>(native_context,
+ HValue* optimized_functions_list = Add<HLoadNamedField>(
+ native_context, static_cast<HValue*>(NULL),
HObjectAccess::ForContextSlot(Context::OPTIMIZED_FUNCTIONS_LIST));
Add<HStoreNamedField>(js_function,
HObjectAccess::ForNextFunctionLinkPointer(),
Add<HStoreNamedField>(js_function,
HObjectAccess::ForNextFunctionLinkPointer(),
graph()->GetConstantUndefined());
- HValue* code_object = Add<HLoadNamedField>(shared_info,
- HObjectAccess::ForCodeOffset());
+ HValue* code_object = Add<HLoadNamedField>(
+ shared_info, static_cast<HValue*>(NULL), HObjectAccess::ForCodeOffset());
Add<HStoreCodeEntry>(js_function, code_object);
}
HValue* native_context) {
Counters* counters = isolate()->counters();
IfBuilder is_optimized(this);
- HInstruction* optimized_map = Add<HLoadNamedField>(shared_info,
+ HInstruction* optimized_map = Add<HLoadNamedField>(
+ shared_info, static_cast<HValue*>(NULL),
HObjectAccess::ForOptimizedCodeMap());
HValue* null_constant = Add<HConstant>(0);
is_optimized.If<HCompareObjectEqAndBranch>(optimized_map, null_constant);
// (native context, optimized code, literals).
// Map must never be empty, so check the first elements.
Label install_optimized;
- HValue* first_context_slot = Add<HLoadNamedField>(optimized_map,
+ HValue* first_context_slot = Add<HLoadNamedField>(
+ optimized_map, static_cast<HValue*>(NULL),
HObjectAccess::ForFirstContextSlot());
- HValue* first_osr_ast_slot = Add<HLoadNamedField>(optimized_map,
+ HValue* first_osr_ast_slot = Add<HLoadNamedField>(
+ optimized_map, static_cast<HValue*>(NULL),
HObjectAccess::ForFirstOsrAstIdSlot());
HValue* osr_ast_id_none = Add<HConstant>(BailoutId::None().ToInt());
IfBuilder already_in(this);
osr_ast_id_none);
already_in.Then();
{
- HValue* code_object = Add<HLoadNamedField>(optimized_map,
- HObjectAccess::ForFirstCodeSlot());
+ HValue* code_object = Add<HLoadNamedField>(
+ optimized_map, static_cast<HValue*>(NULL),
+ HObjectAccess::ForFirstCodeSlot());
BuildInstallOptimizedCode(js_function, native_context, code_object);
}
already_in.Else();
context(),
LoopBuilder::kPostDecrement,
shared_function_entry_length);
- HValue* array_length = Add<HLoadNamedField>(optimized_map,
+ HValue* array_length = Add<HLoadNamedField>(
+ optimized_map, static_cast<HValue*>(NULL),
HObjectAccess::ForFixedArrayLength());
HValue* slot_iterator = loop_builder.BeginBody(array_length,
graph()->GetConstant0(),
// Compute the function map in the current native context and set that
// as the map of the allocated object.
HInstruction* native_context = BuildGetNativeContext();
- HInstruction* map_slot_value = Add<HLoadNamedField>(native_context,
+ HInstruction* map_slot_value = Add<HLoadNamedField>(
+ native_context, static_cast<HValue*>(NULL),
HObjectAccess::ForContextSlot(map_index));
Add<HStoreNamedField>(js_function, HObjectAccess::ForMap(), map_slot_value);
// Copy the global object from the previous context.
HValue* global_object = Add<HLoadNamedField>(
- context(), HObjectAccess::ForContextSlot(Context::GLOBAL_OBJECT_INDEX));
+ context(), static_cast<HValue*>(NULL),
+ HObjectAccess::ForContextSlot(Context::GLOBAL_OBJECT_INDEX));
Add<HStoreNamedField>(function_context,
HObjectAccess::ForContextSlot(
Context::GLOBAL_OBJECT_INDEX),
}
+template<>
+HValue* CodeStubGraphBuilder<RegExpConstructResultStub>::BuildCodeStub() {
+ // Determine the parameters.
+ HValue* length = GetParameter(RegExpConstructResultStub::kLength);
+ HValue* index = GetParameter(RegExpConstructResultStub::kIndex);
+ HValue* input = GetParameter(RegExpConstructResultStub::kInput);
+
+ return BuildRegExpConstructResult(length, index, input);
+}
+
+
+Handle<Code> RegExpConstructResultStub::GenerateCode(Isolate* isolate) {
+ return DoGenerateCode(isolate, this);
+}
+
+
} } // namespace v8::internal