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

Unified Diff: src/factory.cc

Issue 247263003: Hide heap methods where possible. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/factory.h ('k') | src/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 355e24fd6a13b7bb119aa1821bf085dca668b804..e12d296a44668e19837e3d091764b7b4a1c1fbb0 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -631,10 +631,9 @@ Handle<Symbol> Factory::NewSymbol() {
Handle<Symbol> Factory::NewPrivateSymbol() {
- CALL_HEAP_FUNCTION(
- isolate(),
- isolate()->heap()->AllocatePrivateSymbol(),
- Symbol);
+ Handle<Symbol> symbol = NewSymbol();
+ symbol->set_is_private(true);
+ return symbol;
}
@@ -1333,9 +1332,9 @@ Handle<JSObject> Factory::NewExternal(void* value) {
}
-Handle<Code> NewCodeHelper(Isolate* isolate, int object_size, bool immovable) {
- CALL_HEAP_FUNCTION(isolate,
- isolate->heap()->AllocateCode(object_size, immovable),
+Handle<Code> Factory::NewCodeRaw(int object_size, bool immovable) {
+ CALL_HEAP_FUNCTION(isolate(),
+ isolate()->heap()->AllocateCode(object_size, immovable),
Code);
}
@@ -1354,7 +1353,7 @@ Handle<Code> Factory::NewCode(const CodeDesc& desc,
int body_size = RoundUp(desc.instr_size, kObjectAlignment);
int obj_size = Code::SizeFor(body_size);
- Handle<Code> code = NewCodeHelper(isolate(), obj_size, immovable);
+ Handle<Code> code = NewCodeRaw(obj_size, immovable);
ASSERT(!isolate()->code_range()->exists() ||
isolate()->code_range()->contains(code->address()));
« no previous file with comments | « src/factory.h ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698