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

Unified Diff: src/x64/full-codegen-x64.cc

Issue 346413004: Remove distinction between hidden and normal runtime functions (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix natives fuzzing Created 6 years, 6 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
Index: src/x64/full-codegen-x64.cc
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc
index 46d91a05f131349428b2cafca81673ab3c4e142d..55a57d7a810a5a47d1a3d8335fe0ea009da462e3 100644
--- a/src/x64/full-codegen-x64.cc
+++ b/src/x64/full-codegen-x64.cc
@@ -189,7 +189,7 @@ void FullCodeGenerator::Generate() {
if (FLAG_harmony_scoping && info->scope()->is_global_scope()) {
__ Push(rdi);
__ Push(info->scope()->GetScopeInfo());
- __ CallRuntime(Runtime::kHiddenNewGlobalContext, 2);
+ __ CallRuntime(Runtime::kNewGlobalContext, 2);
} else if (heap_slots <= FastNewContextStub::kMaximumSlots) {
FastNewContextStub stub(isolate(), heap_slots);
__ CallStub(&stub);
@@ -197,7 +197,7 @@ void FullCodeGenerator::Generate() {
need_write_barrier = false;
} else {
__ Push(rdi);
- __ CallRuntime(Runtime::kHiddenNewFunctionContext, 1);
+ __ CallRuntime(Runtime::kNewFunctionContext, 1);
}
function_in_register = false;
// Context is returned in rax. It replaces the context passed to us.
@@ -824,7 +824,7 @@ void FullCodeGenerator::VisitVariableDeclaration(
} else {
__ Push(Smi::FromInt(0)); // Indicates no initial value.
}
- __ CallRuntime(Runtime::kHiddenDeclareContextSlot, 4);
+ __ CallRuntime(Runtime::kDeclareContextSlot, 4);
break;
}
}
@@ -878,7 +878,7 @@ void FullCodeGenerator::VisitFunctionDeclaration(
__ Push(variable->name());
__ Push(Smi::FromInt(NONE));
VisitForStackValue(declaration->fun());
- __ CallRuntime(Runtime::kHiddenDeclareContextSlot, 4);
+ __ CallRuntime(Runtime::kDeclareContextSlot, 4);
break;
}
}
@@ -948,7 +948,7 @@ void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
__ Push(rsi); // The context is the first argument.
__ Push(pairs);
__ Push(Smi::FromInt(DeclareGlobalsFlags()));
- __ CallRuntime(Runtime::kHiddenDeclareGlobals, 3);
+ __ CallRuntime(Runtime::kDeclareGlobals, 3);
// Return value is ignored.
}
@@ -956,7 +956,7 @@ void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
void FullCodeGenerator::DeclareModules(Handle<FixedArray> descriptions) {
// Call the runtime to declare the modules.
__ Push(descriptions);
- __ CallRuntime(Runtime::kHiddenDeclareModules, 1);
+ __ CallRuntime(Runtime::kDeclareModules, 1);
// Return value is ignored.
}
@@ -1309,7 +1309,7 @@ void FullCodeGenerator::EmitNewClosure(Handle<SharedFunctionInfo> info,
__ Push(pretenure
? isolate()->factory()->true_value()
: isolate()->factory()->false_value());
- __ CallRuntime(Runtime::kHiddenNewClosure, 3);
+ __ CallRuntime(Runtime::kNewClosure, 3);
}
context()->Plug(rax);
}
@@ -1434,7 +1434,7 @@ void FullCodeGenerator::EmitDynamicLookupFastCase(Variable* var,
__ LoadRoot(rax, Heap::kUndefinedValueRootIndex);
} else { // LET || CONST
__ Push(var->name());
- __ CallRuntime(Runtime::kHiddenThrowReferenceError, 1);
+ __ CallRuntime(Runtime::kThrowReferenceError, 1);
}
}
__ jmp(done);
@@ -1511,7 +1511,7 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
// Throw a reference error when using an uninitialized let/const
// binding in harmony mode.
__ Push(var->name());
- __ CallRuntime(Runtime::kHiddenThrowReferenceError, 1);
+ __ CallRuntime(Runtime::kThrowReferenceError, 1);
} else {
// Uninitalized const bindings outside of harmony mode are unholed.
ASSERT(var->mode() == CONST_LEGACY);
@@ -1535,7 +1535,7 @@ void FullCodeGenerator::EmitVariableLoad(VariableProxy* proxy) {
__ bind(&slow);
__ Push(rsi); // Context.
__ Push(var->name());
- __ CallRuntime(Runtime::kHiddenLoadContextSlot, 2);
+ __ CallRuntime(Runtime::kLoadContextSlot, 2);
__ bind(&done);
context()->Plug(rax);
break;
@@ -1566,7 +1566,7 @@ void FullCodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) {
__ Push(Smi::FromInt(expr->literal_index()));
__ Push(expr->pattern());
__ Push(expr->flags());
- __ CallRuntime(Runtime::kHiddenMaterializeRegExpLiteral, 4);
+ __ CallRuntime(Runtime::kMaterializeRegExpLiteral, 4);
__ movp(rbx, rax);
__ bind(&materialized);
@@ -1578,7 +1578,7 @@ void FullCodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) {
__ bind(&runtime_allocate);
__ Push(rbx);
__ Push(Smi::FromInt(size));
- __ CallRuntime(Runtime::kHiddenAllocateInNewSpace, 1);
+ __ CallRuntime(Runtime::kAllocateInNewSpace, 1);
__ Pop(rbx);
__ bind(&allocated);
@@ -1627,7 +1627,7 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
__ Push(Smi::FromInt(expr->literal_index()));
__ Push(constant_properties);
__ Push(Smi::FromInt(flags));
- __ CallRuntime(Runtime::kHiddenCreateObjectLiteral, 4);
+ __ CallRuntime(Runtime::kCreateObjectLiteral, 4);
} else {
__ movp(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset));
__ movp(rax, FieldOperand(rdi, JSFunction::kLiteralsOffset));
@@ -1764,7 +1764,7 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
__ Push(Smi::FromInt(expr->literal_index()));
__ Push(constant_elements);
__ Push(Smi::FromInt(flags));
- __ CallRuntime(Runtime::kHiddenCreateArrayLiteral, 4);
+ __ CallRuntime(Runtime::kCreateArrayLiteral, 4);
} else {
__ movp(rbx, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset));
__ movp(rax, FieldOperand(rbx, JSFunction::kLiteralsOffset));
@@ -1965,7 +1965,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ cmpp(rsp, rbx);
__ j(equal, &post_runtime);
__ Push(rax); // generator object
- __ CallRuntime(Runtime::kHiddenSuspendJSGeneratorObject, 1);
+ __ CallRuntime(Runtime::kSuspendJSGeneratorObject, 1);
__ movp(context_register(),
Operand(rbp, StandardFrameConstants::kContextOffset));
__ bind(&post_runtime);
@@ -2034,7 +2034,7 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
__ movp(rcx, rsi);
__ RecordWriteField(rax, JSGeneratorObject::kContextOffset, rcx, rdx,
kDontSaveFPRegs);
- __ CallRuntime(Runtime::kHiddenSuspendJSGeneratorObject, 1);
+ __ CallRuntime(Runtime::kSuspendJSGeneratorObject, 1);
__ movp(context_register(),
Operand(rbp, StandardFrameConstants::kContextOffset));
__ Pop(rax); // result
@@ -2088,7 +2088,7 @@ void FullCodeGenerator::EmitGeneratorResume(Expression *generator,
Expression *value,
JSGeneratorObject::ResumeMode resume_mode) {
// The value stays in rax, and is ultimately read by the resumed generator, as
- // if CallRuntime(Runtime::kHiddenSuspendJSGeneratorObject) returned it. Or it
+ // if CallRuntime(Runtime::kSuspendJSGeneratorObject) returned it. Or it
// is read to throw the value when the resumed generator is already closed.
// rbx will hold the generator object until the activation has been resumed.
VisitForStackValue(generator);
@@ -2168,7 +2168,7 @@ void FullCodeGenerator::EmitGeneratorResume(Expression *generator,
__ Push(rbx);
__ Push(result_register());
__ Push(Smi::FromInt(resume_mode));
- __ CallRuntime(Runtime::kHiddenResumeJSGeneratorObject, 3);
+ __ CallRuntime(Runtime::kResumeJSGeneratorObject, 3);
// Not reached: the runtime call returns elsewhere.
__ Abort(kGeneratorFailedToResume);
@@ -2182,14 +2182,14 @@ void FullCodeGenerator::EmitGeneratorResume(Expression *generator,
} else {
// Throw the provided value.
__ Push(rax);
- __ CallRuntime(Runtime::kHiddenThrow, 1);
+ __ CallRuntime(Runtime::kThrow, 1);
}
__ jmp(&done);
// Throw error if we attempt to operate on a running generator.
__ bind(&wrong_state);
__ Push(rbx);
- __ CallRuntime(Runtime::kHiddenThrowGeneratorStateError, 1);
+ __ CallRuntime(Runtime::kThrowGeneratorStateError, 1);
__ bind(&done);
context()->Plug(result_register());
@@ -2207,7 +2207,7 @@ void FullCodeGenerator::EmitCreateIteratorResult(bool done) {
__ bind(&gc_required);
__ Push(Smi::FromInt(map->instance_size()));
- __ CallRuntime(Runtime::kHiddenAllocateInNewSpace, 1);
+ __ CallRuntime(Runtime::kAllocateInNewSpace, 1);
__ movp(context_register(),
Operand(rbp, StandardFrameConstants::kContextOffset));
@@ -2386,7 +2386,7 @@ void FullCodeGenerator::EmitCallStoreContextSlot(
__ Push(rsi); // Context.
__ Push(name);
__ Push(Smi::FromInt(strict_mode));
- __ CallRuntime(Runtime::kHiddenStoreContextSlot, 4);
+ __ CallRuntime(Runtime::kStoreContextSlot, 4);
}
@@ -2405,7 +2405,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var,
__ Push(rax);
__ Push(rsi);
__ Push(var->name());
- __ CallRuntime(Runtime::kHiddenInitializeConstContextSlot, 3);
+ __ CallRuntime(Runtime::kInitializeConstContextSlot, 3);
} else {
ASSERT(var->IsStackLocal() || var->IsContextSlot());
Label skip;
@@ -2429,7 +2429,7 @@ void FullCodeGenerator::EmitVariableAssignment(Variable* var,
__ CompareRoot(rdx, Heap::kTheHoleValueRootIndex);
__ j(not_equal, &assign, Label::kNear);
__ Push(var->name());
- __ CallRuntime(Runtime::kHiddenThrowReferenceError, 1);
+ __ CallRuntime(Runtime::kThrowReferenceError, 1);
__ bind(&assign);
EmitStoreToStackLocalOrContextSlot(var, location);
}
@@ -2616,7 +2616,7 @@ void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) {
__ Push(Smi::FromInt(scope()->start_position()));
// Do the runtime call.
- __ CallRuntime(Runtime::kHiddenResolvePossiblyDirectEval, 5);
+ __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 5);
}
@@ -2683,7 +2683,7 @@ void FullCodeGenerator::VisitCall(Call* expr) {
// the object holding it (returned in rdx).
__ Push(context_register());
__ Push(proxy->name());
- __ CallRuntime(Runtime::kHiddenLoadContextSlot, 2);
+ __ CallRuntime(Runtime::kLoadContextSlot, 2);
__ Push(rax); // Function.
__ Push(rdx); // Receiver.
@@ -3315,7 +3315,7 @@ void FullCodeGenerator::EmitDateField(CallRuntime* expr) {
}
__ bind(&not_date_object);
- __ CallRuntime(Runtime::kHiddenThrowNotDateError, 0);
+ __ CallRuntime(Runtime::kThrowNotDateError, 0);
__ bind(&done);
context()->Plug(rax);
}
@@ -3675,7 +3675,7 @@ void FullCodeGenerator::EmitGetFromCache(CallRuntime* expr) {
// Call runtime to perform the lookup.
__ Push(cache);
__ Push(key);
- __ CallRuntime(Runtime::kHiddenGetFromCache, 2);
+ __ CallRuntime(Runtime::kGetFromCache, 2);
__ bind(&done);
context()->Plug(rax);
@@ -4104,7 +4104,7 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
// context where the variable was introduced.
__ Push(context_register());
__ Push(var->name());
- __ CallRuntime(Runtime::kHiddenDeleteContextSlot, 2);
+ __ CallRuntime(Runtime::kDeleteContextSlot, 2);
context()->Plug(rax);
}
} else {
@@ -4391,7 +4391,7 @@ void FullCodeGenerator::VisitForTypeofValue(Expression* expr) {
__ bind(&slow);
__ Push(rsi);
__ Push(proxy->name());
- __ CallRuntime(Runtime::kHiddenLoadContextSlotNoReferenceError, 2);
+ __ CallRuntime(Runtime::kLoadContextSlotNoReferenceError, 2);
PrepareForBailout(expr, TOS_REG);
__ bind(&done);

Powered by Google App Engine
This is Rietveld 408576698