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 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api.h" | 8 #include "src/api.h" |
9 #include "src/arguments.h" | 9 #include "src/arguments.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1319 // Strict mode doesn't allow setting non-existent global property. | 1319 // Strict mode doesn't allow setting non-existent global property. |
1320 return ReferenceError("not_defined", name); | 1320 return ReferenceError("not_defined", name); |
1321 } | 1321 } |
1322 if (FLAG_use_ic) { | 1322 if (FLAG_use_ic) { |
1323 if (state() == UNINITIALIZED) { | 1323 if (state() == UNINITIALIZED) { |
1324 Handle<Code> stub = pre_monomorphic_stub(); | 1324 Handle<Code> stub = pre_monomorphic_stub(); |
1325 set_target(*stub); | 1325 set_target(*stub); |
1326 TRACE_IC("StoreIC", name); | 1326 TRACE_IC("StoreIC", name); |
1327 } else if (can_store) { | 1327 } else if (can_store) { |
1328 UpdateCaches(&lookup, receiver, name, value); | 1328 UpdateCaches(&lookup, receiver, name, value); |
1329 } else if (!name->IsCacheable(isolate()) || | 1329 } else if (lookup.IsNormal() || |
1330 lookup.IsNormal() || | |
1331 (lookup.IsField() && lookup.CanHoldValue(value))) { | 1330 (lookup.IsField() && lookup.CanHoldValue(value))) { |
1332 Handle<Code> stub = generic_stub(); | 1331 Handle<Code> stub = generic_stub(); |
1333 set_target(*stub); | 1332 set_target(*stub); |
1334 } | 1333 } |
1335 } | 1334 } |
1336 | 1335 |
1337 // Set the property. | 1336 // Set the property. |
1338 Handle<Object> result; | 1337 Handle<Object> result; |
1339 ASSIGN_RETURN_ON_EXCEPTION( | 1338 ASSIGN_RETURN_ON_EXCEPTION( |
1340 isolate(), | 1339 isolate(), |
(...skipping 1758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3099 #undef ADDR | 3098 #undef ADDR |
3100 }; | 3099 }; |
3101 | 3100 |
3102 | 3101 |
3103 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 3102 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
3104 return IC_utilities[id]; | 3103 return IC_utilities[id]; |
3105 } | 3104 } |
3106 | 3105 |
3107 | 3106 |
3108 } } // namespace v8::internal | 3107 } } // namespace v8::internal |
OLD | NEW |