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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
9 #include "src/debug.h" | 9 #include "src/debug.h" |
10 #include "src/messages.h" | 10 #include "src/messages.h" |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 | 347 |
348 | 348 |
349 static inline Object* ReturnBoolean(bool value, Isolate* isolate) { | 349 static inline Object* ReturnBoolean(bool value, Isolate* isolate) { |
350 return isolate->heap()->ToBoolean(value); | 350 return isolate->heap()->ToBoolean(value); |
351 } | 351 } |
352 | 352 |
353 | 353 |
354 CALLSITE_GET(GetFileName, ReturnDereferencedHandle) | 354 CALLSITE_GET(GetFileName, ReturnDereferencedHandle) |
355 CALLSITE_GET(GetFunctionName, ReturnDereferencedHandle) | 355 CALLSITE_GET(GetFunctionName, ReturnDereferencedHandle) |
356 CALLSITE_GET(GetScriptNameOrSourceUrl, ReturnDereferencedHandle) | 356 CALLSITE_GET(GetScriptNameOrSourceUrl, ReturnDereferencedHandle) |
| 357 CALLSITE_GET(GetMethodName, ReturnDereferencedHandle) |
357 CALLSITE_GET(GetLineNumber, ReturnPositiveSmiOrNull) | 358 CALLSITE_GET(GetLineNumber, ReturnPositiveSmiOrNull) |
358 CALLSITE_GET(GetColumnNumber, ReturnPositiveSmiOrNull) | 359 CALLSITE_GET(GetColumnNumber, ReturnPositiveSmiOrNull) |
359 CALLSITE_GET(IsNative, ReturnBoolean) | 360 CALLSITE_GET(IsNative, ReturnBoolean) |
360 CALLSITE_GET(IsToplevel, ReturnBoolean) | 361 CALLSITE_GET(IsToplevel, ReturnBoolean) |
361 CALLSITE_GET(IsEval, ReturnBoolean) | 362 CALLSITE_GET(IsEval, ReturnBoolean) |
| 363 CALLSITE_GET(IsConstructor, ReturnBoolean) |
362 | 364 |
363 #undef CALLSITE_GET | 365 #undef CALLSITE_GET |
364 | 366 |
365 | 367 |
366 RUNTIME_FUNCTION(Runtime_IS_VAR) { | 368 RUNTIME_FUNCTION(Runtime_IS_VAR) { |
367 UNREACHABLE(); // implemented as macro in the parser | 369 UNREACHABLE(); // implemented as macro in the parser |
368 return NULL; | 370 return NULL; |
369 } | 371 } |
370 | 372 |
371 | 373 |
(...skipping 29 matching lines...) Expand all Loading... |
401 return args[0]; | 403 return args[0]; |
402 } | 404 } |
403 | 405 |
404 | 406 |
405 RUNTIME_FUNCTION(Runtime_HarmonyToString) { | 407 RUNTIME_FUNCTION(Runtime_HarmonyToString) { |
406 // TODO(caitp): Delete this runtime method when removing --harmony-tostring | 408 // TODO(caitp): Delete this runtime method when removing --harmony-tostring |
407 return isolate->heap()->ToBoolean(FLAG_harmony_tostring); | 409 return isolate->heap()->ToBoolean(FLAG_harmony_tostring); |
408 } | 410 } |
409 } | 411 } |
410 } // namespace v8::internal | 412 } // namespace v8::internal |
OLD | NEW |