OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/isolate-inl.h" | 10 #include "src/isolate-inl.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 | 40 |
41 RUNTIME_FUNCTION(Runtime_ThrowConstructorNonCallableError) { | 41 RUNTIME_FUNCTION(Runtime_ThrowConstructorNonCallableError) { |
42 HandleScope scope(isolate); | 42 HandleScope scope(isolate); |
43 DCHECK(args.length() == 0); | 43 DCHECK(args.length() == 0); |
44 THROW_NEW_ERROR_RETURN_FAILURE( | 44 THROW_NEW_ERROR_RETURN_FAILURE( |
45 isolate, | 45 isolate, |
46 NewTypeError("constructor_noncallable", HandleVector<Object>(NULL, 0))); | 46 NewTypeError("constructor_noncallable", HandleVector<Object>(NULL, 0))); |
47 } | 47 } |
48 | 48 |
49 | 49 |
50 RUNTIME_FUNCTION(Runtime_ThrowArrayNotSubclassableError) { | |
51 HandleScope scope(isolate); | |
52 DCHECK(args.length() == 0); | |
53 THROW_NEW_ERROR_RETURN_FAILURE( | |
54 isolate, | |
55 NewTypeError("array_not_subclassable", HandleVector<Object>(NULL, 0))); | |
56 } | |
57 | |
58 | |
59 RUNTIME_FUNCTION(Runtime_ToMethod) { | 50 RUNTIME_FUNCTION(Runtime_ToMethod) { |
60 HandleScope scope(isolate); | 51 HandleScope scope(isolate); |
61 DCHECK(args.length() == 2); | 52 DCHECK(args.length() == 2); |
62 CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0); | 53 CONVERT_ARG_HANDLE_CHECKED(JSFunction, fun, 0); |
63 CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1); | 54 CONVERT_ARG_HANDLE_CHECKED(JSObject, home_object, 1); |
64 Handle<JSFunction> clone = JSFunction::CloneClosure(fun); | 55 Handle<JSFunction> clone = JSFunction::CloneClosure(fun); |
65 Handle<Symbol> home_object_symbol(isolate->heap()->home_object_symbol()); | 56 Handle<Symbol> home_object_symbol(isolate->heap()->home_object_symbol()); |
66 JSObject::SetOwnPropertyIgnoreAttributes(clone, home_object_symbol, | 57 JSObject::SetOwnPropertyIgnoreAttributes(clone, home_object_symbol, |
67 home_object, DONT_ENUM).Assert(); | 58 home_object, DONT_ENUM).Assert(); |
68 return *clone; | 59 return *clone; |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 return *isolate->factory()->undefined_value(); | 419 return *isolate->factory()->undefined_value(); |
429 } | 420 } |
430 | 421 |
431 | 422 |
432 RUNTIME_FUNCTION(RuntimeReference_DefaultConstructorCallSuper) { | 423 RUNTIME_FUNCTION(RuntimeReference_DefaultConstructorCallSuper) { |
433 UNREACHABLE(); | 424 UNREACHABLE(); |
434 return nullptr; | 425 return nullptr; |
435 } | 426 } |
436 } | 427 } |
437 } // namespace v8::internal | 428 } // namespace v8::internal |
OLD | NEW |