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 "v8.h" | 8 #include "v8.h" |
9 | 9 |
10 #include "accessors.h" | 10 #include "accessors.h" |
(...skipping 3248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3259 Vector< Handle<Object> > argv = HandleVector<Object>(NULL, 0); | 3259 Vector< Handle<Object> > argv = HandleVector<Object>(NULL, 0); |
3260 Handle<Object> error = isolate->factory()->NewError(message, argv); | 3260 Handle<Object> error = isolate->factory()->NewError(message, argv); |
3261 return isolate->Throw(*error); | 3261 return isolate->Throw(*error); |
3262 } | 3262 } |
3263 | 3263 |
3264 | 3264 |
3265 RUNTIME_FUNCTION(Runtime_ObjectFreeze) { | 3265 RUNTIME_FUNCTION(Runtime_ObjectFreeze) { |
3266 HandleScope scope(isolate); | 3266 HandleScope scope(isolate); |
3267 ASSERT(args.length() == 1); | 3267 ASSERT(args.length() == 1); |
3268 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0); | 3268 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0); |
| 3269 |
| 3270 // %ObjectFreeze is a fast path and these cases are handled elsewhere. |
| 3271 RUNTIME_ASSERT(!object->HasSloppyArgumentsElements() && |
| 3272 !object->map()->is_observed() && |
| 3273 !object->IsJSProxy()); |
| 3274 |
3269 Handle<Object> result; | 3275 Handle<Object> result; |
3270 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, JSObject::Freeze(object)); | 3276 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, JSObject::Freeze(object)); |
3271 return *result; | 3277 return *result; |
3272 } | 3278 } |
3273 | 3279 |
3274 | 3280 |
3275 RUNTIME_FUNCTION(RuntimeHidden_StringCharCodeAt) { | 3281 RUNTIME_FUNCTION(RuntimeHidden_StringCharCodeAt) { |
3276 HandleScope handle_scope(isolate); | 3282 HandleScope handle_scope(isolate); |
3277 ASSERT(args.length() == 2); | 3283 ASSERT(args.length() == 2); |
3278 | 3284 |
(...skipping 11851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15130 } | 15136 } |
15131 return NULL; | 15137 return NULL; |
15132 } | 15138 } |
15133 | 15139 |
15134 | 15140 |
15135 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { | 15141 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { |
15136 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 15142 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
15137 } | 15143 } |
15138 | 15144 |
15139 } } // namespace v8::internal | 15145 } } // namespace v8::internal |
OLD | NEW |