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

Side by Side Diff: src/x64/stub-cache-x64.cc

Issue 429053005: Avoid one repeated property lookup when computing load ICs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/stub-cache.h ('k') | src/x87/stub-cache-x87.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after
1173 } 1173 }
1174 __ ret(0); 1174 __ ret(0);
1175 } 1175 }
1176 1176
1177 1177
1178 #undef __ 1178 #undef __
1179 #define __ ACCESS_MASM(masm()) 1179 #define __ ACCESS_MASM(masm())
1180 1180
1181 1181
1182 Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal( 1182 Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
1183 Handle<PropertyCell> cell, Handle<Name> name, bool is_dont_delete) { 1183 Handle<PropertyCell> cell, Handle<Name> name, bool is_configurable) {
1184 Label miss; 1184 Label miss;
1185 FrontendHeader(receiver(), name, &miss); 1185 FrontendHeader(receiver(), name, &miss);
1186 1186
1187 // Get the value from the cell. 1187 // Get the value from the cell.
1188 Register result = StoreIC::ValueRegister(); 1188 Register result = StoreIC::ValueRegister();
1189 __ Move(result, cell); 1189 __ Move(result, cell);
1190 __ movp(result, FieldOperand(result, PropertyCell::kValueOffset)); 1190 __ movp(result, FieldOperand(result, PropertyCell::kValueOffset));
1191 1191
1192 // Check for deleted property if property can actually be deleted. 1192 // Check for deleted property if property can actually be deleted.
1193 if (!is_dont_delete) { 1193 if (is_configurable) {
1194 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); 1194 __ CompareRoot(result, Heap::kTheHoleValueRootIndex);
1195 __ j(equal, &miss); 1195 __ j(equal, &miss);
1196 } else if (FLAG_debug_code) { 1196 } else if (FLAG_debug_code) {
1197 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); 1197 __ CompareRoot(result, Heap::kTheHoleValueRootIndex);
1198 __ Check(not_equal, kDontDeleteCellsCannotContainTheHole); 1198 __ Check(not_equal, kDontDeleteCellsCannotContainTheHole);
1199 } 1199 }
1200 1200
1201 Counters* counters = isolate()->counters(); 1201 Counters* counters = isolate()->counters();
1202 __ IncrementCounter(counters->named_load_global_stub(), 1); 1202 __ IncrementCounter(counters->named_load_global_stub(), 1);
1203 __ ret(0); 1203 __ ret(0);
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
1311 // ----------------------------------- 1311 // -----------------------------------
1312 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 1312 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
1313 } 1313 }
1314 1314
1315 1315
1316 #undef __ 1316 #undef __
1317 1317
1318 } } // namespace v8::internal 1318 } } // namespace v8::internal
1319 1319
1320 #endif // V8_TARGET_ARCH_X64 1320 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/stub-cache.h ('k') | src/x87/stub-cache-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698