| 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 3240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3251 Vector< Handle<Object> > argv = HandleVector<Object>(NULL, 0); | 3251 Vector< Handle<Object> > argv = HandleVector<Object>(NULL, 0); |
| 3252 Handle<Object> error = isolate->factory()->NewError(message, argv); | 3252 Handle<Object> error = isolate->factory()->NewError(message, argv); |
| 3253 return isolate->Throw(*error); | 3253 return isolate->Throw(*error); |
| 3254 } | 3254 } |
| 3255 | 3255 |
| 3256 | 3256 |
| 3257 RUNTIME_FUNCTION(Runtime_ObjectFreeze) { | 3257 RUNTIME_FUNCTION(Runtime_ObjectFreeze) { |
| 3258 HandleScope scope(isolate); | 3258 HandleScope scope(isolate); |
| 3259 ASSERT(args.length() == 1); | 3259 ASSERT(args.length() == 1); |
| 3260 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0); | 3260 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0); |
| 3261 |
| 3262 // %ObjectFreeze is a fast path and these cases are handled elsewhere. |
| 3263 RUNTIME_ASSERT(!object->HasSloppyArgumentsElements() && |
| 3264 !object->map()->is_observed() && |
| 3265 !object->IsJSProxy()); |
| 3266 |
| 3261 Handle<Object> result; | 3267 Handle<Object> result; |
| 3262 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, JSObject::Freeze(object)); | 3268 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, JSObject::Freeze(object)); |
| 3263 return *result; | 3269 return *result; |
| 3264 } | 3270 } |
| 3265 | 3271 |
| 3266 | 3272 |
| 3267 RUNTIME_FUNCTION(RuntimeHidden_StringCharCodeAt) { | 3273 RUNTIME_FUNCTION(RuntimeHidden_StringCharCodeAt) { |
| 3268 HandleScope handle_scope(isolate); | 3274 HandleScope handle_scope(isolate); |
| 3269 ASSERT(args.length() == 2); | 3275 ASSERT(args.length() == 2); |
| 3270 | 3276 |
| (...skipping 11847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15118 } | 15124 } |
| 15119 return NULL; | 15125 return NULL; |
| 15120 } | 15126 } |
| 15121 | 15127 |
| 15122 | 15128 |
| 15123 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { | 15129 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { |
| 15124 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 15130 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
| 15125 } | 15131 } |
| 15126 | 15132 |
| 15127 } } // namespace v8::internal | 15133 } } // namespace v8::internal |
| OLD | NEW |