Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: src/factory.cc

Issue 255003002: Make CreateInitialObjects more concise. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "factory.h" 5 #include "factory.h"
6 6
7 #include "conversions.h" 7 #include "conversions.h"
8 #include "isolate-inl.h" 8 #include "isolate-inl.h"
9 #include "macro-assembler.h" 9 #include "macro-assembler.h"
10 10
(...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after
1095 1095
1096 1096
1097 Handle<HeapNumber> Factory::NewHeapNumber(double value, 1097 Handle<HeapNumber> Factory::NewHeapNumber(double value,
1098 PretenureFlag pretenure) { 1098 PretenureFlag pretenure) {
1099 CALL_HEAP_FUNCTION( 1099 CALL_HEAP_FUNCTION(
1100 isolate(), 1100 isolate(),
1101 isolate()->heap()->AllocateHeapNumber(value, pretenure), HeapNumber); 1101 isolate()->heap()->AllocateHeapNumber(value, pretenure), HeapNumber);
1102 } 1102 }
1103 1103
1104 1104
1105 Handle<JSObject> Factory::NewNeanderObject() {
1106 CALL_HEAP_FUNCTION(
1107 isolate(),
1108 isolate()->heap()->AllocateJSObjectFromMap(
1109 isolate()->heap()->neander_map()),
1110 JSObject);
1111 }
1112
1113
1114 Handle<Object> Factory::NewTypeError(const char* message, 1105 Handle<Object> Factory::NewTypeError(const char* message,
1115 Vector< Handle<Object> > args) { 1106 Vector< Handle<Object> > args) {
1116 return NewError("MakeTypeError", message, args); 1107 return NewError("MakeTypeError", message, args);
1117 } 1108 }
1118 1109
1119 1110
1120 Handle<Object> Factory::NewTypeError(Handle<String> message) { 1111 Handle<Object> Factory::NewTypeError(Handle<String> message) {
1121 return NewError("$TypeError", message); 1112 return NewError("$TypeError", message);
1122 } 1113 }
1123 1114
(...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after
2328 return Handle<Object>::null(); 2319 return Handle<Object>::null();
2329 } 2320 }
2330 2321
2331 2322
2332 Handle<Object> Factory::ToBoolean(bool value) { 2323 Handle<Object> Factory::ToBoolean(bool value) {
2333 return value ? true_value() : false_value(); 2324 return value ? true_value() : false_value();
2334 } 2325 }
2335 2326
2336 2327
2337 } } // namespace v8::internal 2328 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698