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 "src/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/arguments.h" | 8 #include "src/arguments.h" |
9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
10 #include "src/frames-inl.h" | 10 #include "src/frames-inl.h" |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 CONVERT_ARG_CHECKED(JSFunction, fun, 0); | 104 CONVERT_ARG_CHECKED(JSFunction, fun, 0); |
105 int pos = fun->shared()->start_position(); | 105 int pos = fun->shared()->start_position(); |
106 return Smi::FromInt(pos); | 106 return Smi::FromInt(pos); |
107 } | 107 } |
108 | 108 |
109 RUNTIME_FUNCTION(Runtime_FunctionGetContextData) { | 109 RUNTIME_FUNCTION(Runtime_FunctionGetContextData) { |
110 SealHandleScope shs(isolate); | 110 SealHandleScope shs(isolate); |
111 DCHECK_EQ(1, args.length()); | 111 DCHECK_EQ(1, args.length()); |
112 | 112 |
113 CONVERT_ARG_CHECKED(JSFunction, fun, 0); | 113 CONVERT_ARG_CHECKED(JSFunction, fun, 0); |
114 FixedArray* array = fun->native_context()->embedder_data(); | 114 return fun->native_context()->debug_context_id(); |
115 return array->get(v8::Context::kDebugIdIndex); | |
116 } | 115 } |
117 | 116 |
118 RUNTIME_FUNCTION(Runtime_FunctionSetInstanceClassName) { | 117 RUNTIME_FUNCTION(Runtime_FunctionSetInstanceClassName) { |
119 SealHandleScope shs(isolate); | 118 SealHandleScope shs(isolate); |
120 DCHECK_EQ(2, args.length()); | 119 DCHECK_EQ(2, args.length()); |
121 | 120 |
122 CONVERT_ARG_CHECKED(JSFunction, fun, 0); | 121 CONVERT_ARG_CHECKED(JSFunction, fun, 0); |
123 CONVERT_ARG_CHECKED(String, name, 1); | 122 CONVERT_ARG_CHECKED(String, name, 1); |
124 fun->shared()->set_instance_class_name(name); | 123 fun->shared()->set_instance_class_name(name); |
125 return isolate->heap()->undefined_value(); | 124 return isolate->heap()->undefined_value(); |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 DCHECK_EQ(1, args.length()); | 305 DCHECK_EQ(1, args.length()); |
307 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); | 306 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, function, 0); |
308 return function->IsJSBoundFunction() | 307 return function->IsJSBoundFunction() |
309 ? *JSBoundFunction::ToString( | 308 ? *JSBoundFunction::ToString( |
310 Handle<JSBoundFunction>::cast(function)) | 309 Handle<JSBoundFunction>::cast(function)) |
311 : *JSFunction::ToString(Handle<JSFunction>::cast(function)); | 310 : *JSFunction::ToString(Handle<JSFunction>::cast(function)); |
312 } | 311 } |
313 | 312 |
314 } // namespace internal | 313 } // namespace internal |
315 } // namespace v8 | 314 } // namespace v8 |
OLD | NEW |