OLD | NEW |
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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
8 | 8 |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/ic-inl.h" | 10 #include "src/ic-inl.h" |
(...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1238 } | 1238 } |
1239 __ ret(0); | 1239 __ ret(0); |
1240 } | 1240 } |
1241 | 1241 |
1242 | 1242 |
1243 #undef __ | 1243 #undef __ |
1244 #define __ ACCESS_MASM(masm()) | 1244 #define __ ACCESS_MASM(masm()) |
1245 | 1245 |
1246 | 1246 |
1247 Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal( | 1247 Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal( |
1248 Handle<PropertyCell> cell, Handle<Name> name, bool is_dont_delete) { | 1248 Handle<PropertyCell> cell, Handle<Name> name, bool is_configurable) { |
1249 Label miss; | 1249 Label miss; |
1250 | 1250 |
1251 FrontendHeader(receiver(), name, &miss); | 1251 FrontendHeader(receiver(), name, &miss); |
1252 // Get the value from the cell. | 1252 // Get the value from the cell. |
1253 Register result = StoreIC::ValueRegister(); | 1253 Register result = StoreIC::ValueRegister(); |
1254 if (masm()->serializer_enabled()) { | 1254 if (masm()->serializer_enabled()) { |
1255 __ mov(result, Immediate(cell)); | 1255 __ mov(result, Immediate(cell)); |
1256 __ mov(result, FieldOperand(result, PropertyCell::kValueOffset)); | 1256 __ mov(result, FieldOperand(result, PropertyCell::kValueOffset)); |
1257 } else { | 1257 } else { |
1258 __ mov(result, Operand::ForCell(cell)); | 1258 __ mov(result, Operand::ForCell(cell)); |
1259 } | 1259 } |
1260 | 1260 |
1261 // Check for deleted property if property can actually be deleted. | 1261 // Check for deleted property if property can actually be deleted. |
1262 if (!is_dont_delete) { | 1262 if (is_configurable) { |
1263 __ cmp(result, factory()->the_hole_value()); | 1263 __ cmp(result, factory()->the_hole_value()); |
1264 __ j(equal, &miss); | 1264 __ j(equal, &miss); |
1265 } else if (FLAG_debug_code) { | 1265 } else if (FLAG_debug_code) { |
1266 __ cmp(result, factory()->the_hole_value()); | 1266 __ cmp(result, factory()->the_hole_value()); |
1267 __ Check(not_equal, kDontDeleteCellsCannotContainTheHole); | 1267 __ Check(not_equal, kDontDeleteCellsCannotContainTheHole); |
1268 } | 1268 } |
1269 | 1269 |
1270 Counters* counters = isolate()->counters(); | 1270 Counters* counters = isolate()->counters(); |
1271 __ IncrementCounter(counters->named_load_global_stub(), 1); | 1271 __ IncrementCounter(counters->named_load_global_stub(), 1); |
1272 // The code above already loads the result into the return register. | 1272 // The code above already loads the result into the return register. |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1382 // ----------------------------------- | 1382 // ----------------------------------- |
1383 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 1383 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
1384 } | 1384 } |
1385 | 1385 |
1386 | 1386 |
1387 #undef __ | 1387 #undef __ |
1388 | 1388 |
1389 } } // namespace v8::internal | 1389 } } // namespace v8::internal |
1390 | 1390 |
1391 #endif // V8_TARGET_ARCH_IA32 | 1391 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |