| 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/bootstrapper.h" | 5 #include "src/bootstrapper.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/api-natives.h" | 8 #include "src/api-natives.h" |
| 9 #include "src/base/ieee754.h" | 9 #include "src/base/ieee754.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 2544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2555 } | 2555 } |
| 2556 | 2556 |
| 2557 { // -- C o n s o l e | 2557 { // -- C o n s o l e |
| 2558 Handle<String> name = factory->InternalizeUtf8String("console"); | 2558 Handle<String> name = factory->InternalizeUtf8String("console"); |
| 2559 Handle<JSFunction> cons = factory->NewFunction(name); | 2559 Handle<JSFunction> cons = factory->NewFunction(name); |
| 2560 Handle<JSObject> empty = factory->NewJSObject(isolate->object_function()); | 2560 Handle<JSObject> empty = factory->NewJSObject(isolate->object_function()); |
| 2561 JSFunction::SetInstancePrototype(cons, empty); | 2561 JSFunction::SetInstancePrototype(cons, empty); |
| 2562 Handle<JSObject> console = factory->NewJSObject(cons, TENURED); | 2562 Handle<JSObject> console = factory->NewJSObject(cons, TENURED); |
| 2563 DCHECK(console->IsJSObject()); | 2563 DCHECK(console->IsJSObject()); |
| 2564 JSObject::AddProperty(global, name, console, DONT_ENUM); | 2564 JSObject::AddProperty(global, name, console, DONT_ENUM); |
| 2565 SimpleInstallFunction(console, "debug", Builtins::kConsoleDebug, 1, false); | 2565 SimpleInstallFunction(console, "debug", Builtins::kConsoleDebug, 1, false, |
| 2566 SimpleInstallFunction(console, "error", Builtins::kConsoleError, 1, false); | 2566 NONE); |
| 2567 SimpleInstallFunction(console, "info", Builtins::kConsoleInfo, 1, false); | 2567 SimpleInstallFunction(console, "error", Builtins::kConsoleError, 1, false, |
| 2568 SimpleInstallFunction(console, "log", Builtins::kConsoleLog, 1, false); | 2568 NONE); |
| 2569 SimpleInstallFunction(console, "warn", Builtins::kConsoleWarn, 1, false); | 2569 SimpleInstallFunction(console, "info", Builtins::kConsoleInfo, 1, false, |
| 2570 SimpleInstallFunction(console, "dir", Builtins::kConsoleDir, 1, false); | 2570 NONE); |
| 2571 SimpleInstallFunction(console, "dirxml", Builtins::kConsoleDirXml, 1, | 2571 SimpleInstallFunction(console, "log", Builtins::kConsoleLog, 1, false, |
| 2572 false); | 2572 NONE); |
| 2573 SimpleInstallFunction(console, "table", Builtins::kConsoleTable, 1, false); | 2573 SimpleInstallFunction(console, "warn", Builtins::kConsoleWarn, 1, false, |
| 2574 SimpleInstallFunction(console, "trace", Builtins::kConsoleTrace, 1, false); | 2574 NONE); |
| 2575 SimpleInstallFunction(console, "group", Builtins::kConsoleGroup, 1, false); | 2575 SimpleInstallFunction(console, "dir", Builtins::kConsoleDir, 1, false, |
| 2576 NONE); |
| 2577 SimpleInstallFunction(console, "dirxml", Builtins::kConsoleDirXml, 1, false, |
| 2578 NONE); |
| 2579 SimpleInstallFunction(console, "table", Builtins::kConsoleTable, 1, false, |
| 2580 NONE); |
| 2581 SimpleInstallFunction(console, "trace", Builtins::kConsoleTrace, 1, false, |
| 2582 NONE); |
| 2583 SimpleInstallFunction(console, "group", Builtins::kConsoleGroup, 1, false, |
| 2584 NONE); |
| 2576 SimpleInstallFunction(console, "groupCollapsed", | 2585 SimpleInstallFunction(console, "groupCollapsed", |
| 2577 Builtins::kConsoleGroupCollapsed, 1, false); | 2586 Builtins::kConsoleGroupCollapsed, 1, false, NONE); |
| 2578 SimpleInstallFunction(console, "groupEnd", Builtins::kConsoleGroupEnd, 1, | 2587 SimpleInstallFunction(console, "groupEnd", Builtins::kConsoleGroupEnd, 1, |
| 2579 false); | 2588 false, NONE); |
| 2580 SimpleInstallFunction(console, "clear", Builtins::kConsoleClear, 1, false); | 2589 SimpleInstallFunction(console, "clear", Builtins::kConsoleClear, 1, false, |
| 2581 SimpleInstallFunction(console, "count", Builtins::kConsoleCount, 1, false); | 2590 NONE); |
| 2591 SimpleInstallFunction(console, "count", Builtins::kConsoleCount, 1, false, |
| 2592 NONE); |
| 2582 SimpleInstallFunction(console, "assert", Builtins::kFastConsoleAssert, 1, | 2593 SimpleInstallFunction(console, "assert", Builtins::kFastConsoleAssert, 1, |
| 2583 false); | 2594 false, NONE); |
| 2584 SimpleInstallFunction(console, "markTimeline", | 2595 SimpleInstallFunction(console, "markTimeline", |
| 2585 Builtins::kConsoleMarkTimeline, 1, false); | 2596 Builtins::kConsoleMarkTimeline, 1, false, NONE); |
| 2586 SimpleInstallFunction(console, "profile", Builtins::kConsoleProfile, 1, | 2597 SimpleInstallFunction(console, "profile", Builtins::kConsoleProfile, 1, |
| 2587 false); | 2598 false, NONE); |
| 2588 SimpleInstallFunction(console, "profileEnd", Builtins::kConsoleProfileEnd, | 2599 SimpleInstallFunction(console, "profileEnd", Builtins::kConsoleProfileEnd, |
| 2589 1, false); | 2600 1, false, NONE); |
| 2590 SimpleInstallFunction(console, "timeline", Builtins::kConsoleTimeline, 1, | 2601 SimpleInstallFunction(console, "timeline", Builtins::kConsoleTimeline, 1, |
| 2591 false); | 2602 false, NONE); |
| 2592 SimpleInstallFunction(console, "timelineEnd", Builtins::kConsoleTimelineEnd, | 2603 SimpleInstallFunction(console, "timelineEnd", Builtins::kConsoleTimelineEnd, |
| 2593 1, false); | 2604 1, false, NONE); |
| 2594 SimpleInstallFunction(console, "time", Builtins::kConsoleTime, 1, false); | 2605 SimpleInstallFunction(console, "time", Builtins::kConsoleTime, 1, false, |
| 2606 NONE); |
| 2595 SimpleInstallFunction(console, "timeEnd", Builtins::kConsoleTimeEnd, 1, | 2607 SimpleInstallFunction(console, "timeEnd", Builtins::kConsoleTimeEnd, 1, |
| 2596 false); | 2608 false, NONE); |
| 2597 SimpleInstallFunction(console, "timeStamp", Builtins::kConsoleTimeStamp, 1, | 2609 SimpleInstallFunction(console, "timeStamp", Builtins::kConsoleTimeStamp, 1, |
| 2598 false); | 2610 false, NONE); |
| 2599 JSObject::AddProperty( | 2611 JSObject::AddProperty( |
| 2600 console, factory->to_string_tag_symbol(), | 2612 console, factory->to_string_tag_symbol(), |
| 2601 factory->NewStringFromAsciiChecked("Object"), | 2613 factory->NewStringFromAsciiChecked("Object"), |
| 2602 static_cast<PropertyAttributes>(DONT_ENUM | READ_ONLY)); | 2614 static_cast<PropertyAttributes>(DONT_ENUM | READ_ONLY)); |
| 2603 } | 2615 } |
| 2604 | 2616 |
| 2605 #ifdef V8_INTL_SUPPORT | 2617 #ifdef V8_INTL_SUPPORT |
| 2606 { // -- I n t l | 2618 { // -- I n t l |
| 2607 Handle<String> name = factory->InternalizeUtf8String("Intl"); | 2619 Handle<String> name = factory->InternalizeUtf8String("Intl"); |
| 2608 Handle<JSFunction> cons = factory->NewFunction(name); | 2620 Handle<JSFunction> cons = factory->NewFunction(name); |
| (...skipping 2655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5264 } | 5276 } |
| 5265 | 5277 |
| 5266 | 5278 |
| 5267 // Called when the top-level V8 mutex is destroyed. | 5279 // Called when the top-level V8 mutex is destroyed. |
| 5268 void Bootstrapper::FreeThreadResources() { | 5280 void Bootstrapper::FreeThreadResources() { |
| 5269 DCHECK(!IsActive()); | 5281 DCHECK(!IsActive()); |
| 5270 } | 5282 } |
| 5271 | 5283 |
| 5272 } // namespace internal | 5284 } // namespace internal |
| 5273 } // namespace v8 | 5285 } // namespace v8 |
| OLD | NEW |