Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(444)

Unified Diff: src/hydrogen.cc

Issue 316023002: --debug-code: sanity-checking instrumentation for Lithium object accesses (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed Igor's comments Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 36d62d271ce7d1b8451324cc923827a2586b6f26..d4d192c5a3c6a722e6b6fb3a263cfef632f68db4 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -8851,17 +8851,15 @@ void HOptimizedGraphBuilder::VisitCallNew(CallNew* expr) {
{ NoObservableSideEffectsScope no_effects(this);
ASSERT(initial_map->instance_type() == JS_OBJECT_TYPE);
Add<HStoreNamedField>(receiver,
- HObjectAccess::ForMapAndOffset(initial_map, JSObject::kMapOffset),
- Add<HConstant>(initial_map));
+ HObjectAccess::ForMap(),
+ Add<HConstant>(initial_map));
HValue* empty_fixed_array = Add<HConstant>(factory->empty_fixed_array());
Add<HStoreNamedField>(receiver,
- HObjectAccess::ForMapAndOffset(initial_map,
- JSObject::kPropertiesOffset),
- empty_fixed_array);
+ HObjectAccess::ForPropertiesPointer(),
+ empty_fixed_array);
Add<HStoreNamedField>(receiver,
- HObjectAccess::ForMapAndOffset(initial_map,
- JSObject::kElementsOffset),
- empty_fixed_array);
+ HObjectAccess::ForElementsPointer(),
+ empty_fixed_array);
if (initial_map->inobject_properties() != 0) {
HConstant* undefined = graph()->GetConstantUndefined();
for (int i = 0; i < initial_map->inobject_properties(); i++) {
@@ -10489,6 +10487,7 @@ HInstruction* HOptimizedGraphBuilder::BuildFastLiteral(
HInstruction* object = Add<HAllocate>(object_size_constant, type,
pretenure_flag, instance_type, site_context->current());
+ BuildEmitObjectHeader(boilerplate_object, object);
// If allocation folding reaches Page::kMaxRegularHeapObjectSize the
// elements array may not get folded into the object. Hence, we set the
@@ -10499,8 +10498,6 @@ HInstruction* HOptimizedGraphBuilder::BuildFastLiteral(
Add<HStoreNamedField>(object, HObjectAccess::ForElementsPointer(),
empty_fixed_array);
- BuildEmitObjectHeader(boilerplate_object, object);
-
Handle<FixedArrayBase> elements(boilerplate_object->elements());
int elements_size = (elements->length() > 0 &&
elements->map() != isolate()->heap()->fixed_cow_array_map()) ?
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698