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 <stdlib.h> | 5 #include <stdlib.h> |
6 #include <limits> | 6 #include <limits> |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/accessors.h" | 10 #include "src/accessors.h" |
(...skipping 5070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5081 !lookup.GetCallbackObject()->IsAccessorInfo())) { | 5081 !lookup.GetCallbackObject()->IsAccessorInfo())) { |
5082 JSObject::NormalizeProperties(js_object, CLEAR_INOBJECT_PROPERTIES, 0); | 5082 JSObject::NormalizeProperties(js_object, CLEAR_INOBJECT_PROPERTIES, 0); |
5083 } | 5083 } |
5084 | 5084 |
5085 // Use IgnoreAttributes version since a readonly property may be | 5085 // Use IgnoreAttributes version since a readonly property may be |
5086 // overridden and SetProperty does not allow this. | 5086 // overridden and SetProperty does not allow this. |
5087 Handle<Object> result; | 5087 Handle<Object> result; |
5088 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 5088 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
5089 isolate, result, | 5089 isolate, result, |
5090 JSObject::SetOwnPropertyIgnoreAttributes( | 5090 JSObject::SetOwnPropertyIgnoreAttributes( |
5091 js_object, name, obj_value, attr, | 5091 js_object, name, obj_value, attr)); |
5092 ALLOW_AS_CONSTANT, | |
5093 JSReceiver::PERFORM_EXTENSIBILITY_CHECK, | |
5094 JSReceiver::MAY_BE_STORE_FROM_KEYED, | |
5095 JSObject::DONT_FORCE_FIELD)); | |
5096 return *result; | 5092 return *result; |
5097 } | 5093 } |
5098 | 5094 |
5099 Handle<Object> result; | 5095 Handle<Object> result; |
5100 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 5096 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
5101 isolate, result, | 5097 isolate, result, |
5102 Runtime::DefineObjectProperty( | 5098 Runtime::DefineObjectProperty( |
5103 js_object, name, obj_value, attr, | 5099 js_object, name, obj_value, attr, |
5104 JSReceiver::CERTAINLY_NOT_STORE_FROM_KEYED)); | 5100 JSReceiver::CERTAINLY_NOT_STORE_FROM_KEYED)); |
5105 return *result; | 5101 return *result; |
(...skipping 10000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15106 } | 15102 } |
15107 return NULL; | 15103 return NULL; |
15108 } | 15104 } |
15109 | 15105 |
15110 | 15106 |
15111 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { | 15107 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { |
15112 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 15108 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
15113 } | 15109 } |
15114 | 15110 |
15115 } } // namespace v8::internal | 15111 } } // namespace v8::internal |
OLD | NEW |