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 14781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14792 inline_runtime_functions = true; | 14792 inline_runtime_functions = true; |
14793 INLINE_FUNCTION_LIST(ADD_ENTRY) | 14793 INLINE_FUNCTION_LIST(ADD_ENTRY) |
14794 #undef ADD_ENTRY | 14794 #undef ADD_ENTRY |
14795 ASSERT_EQ(index, entry_count); | 14795 ASSERT_EQ(index, entry_count); |
14796 Handle<JSArray> result = factory->NewJSArrayWithElements(elements); | 14796 Handle<JSArray> result = factory->NewJSArrayWithElements(elements); |
14797 return *result; | 14797 return *result; |
14798 } | 14798 } |
14799 #endif | 14799 #endif |
14800 | 14800 |
14801 | 14801 |
14802 RUNTIME_FUNCTION(RuntimeHidden_Log) { | |
14803 HandleScope handle_scope(isolate); | |
14804 ASSERT(args.length() == 2); | |
14805 CONVERT_ARG_HANDLE_CHECKED(String, format, 0); | |
14806 CONVERT_ARG_HANDLE_CHECKED(JSArray, elms, 1); | |
14807 | |
14808 SmartArrayPointer<char> format_chars = format->ToCString(); | |
14809 isolate->logger()->LogRuntime( | |
14810 Vector<const char>(format_chars.get(), format->length()), elms); | |
14811 return isolate->heap()->undefined_value(); | |
14812 } | |
14813 | |
14814 | |
14815 RUNTIME_FUNCTION(Runtime_IS_VAR) { | 14802 RUNTIME_FUNCTION(Runtime_IS_VAR) { |
14816 UNREACHABLE(); // implemented as macro in the parser | 14803 UNREACHABLE(); // implemented as macro in the parser |
14817 return NULL; | 14804 return NULL; |
14818 } | 14805 } |
14819 | 14806 |
14820 | 14807 |
14821 #define ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(Name) \ | 14808 #define ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION(Name) \ |
14822 RUNTIME_FUNCTION(Runtime_Has##Name) { \ | 14809 RUNTIME_FUNCTION(Runtime_Has##Name) { \ |
14823 CONVERT_ARG_CHECKED(JSObject, obj, 0); \ | 14810 CONVERT_ARG_CHECKED(JSObject, obj, 0); \ |
14824 return isolate->heap()->ToBoolean(obj->Has##Name()); \ | 14811 return isolate->heap()->ToBoolean(obj->Has##Name()); \ |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15263 } | 15250 } |
15264 return NULL; | 15251 return NULL; |
15265 } | 15252 } |
15266 | 15253 |
15267 | 15254 |
15268 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { | 15255 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { |
15269 return &(kIntrinsicFunctions[static_cast<int>(id)]); | 15256 return &(kIntrinsicFunctions[static_cast<int>(id)]); |
15270 } | 15257 } |
15271 | 15258 |
15272 } } // namespace v8::internal | 15259 } } // namespace v8::internal |
OLD | NEW |