MIPS: Refactor optimized in hydrogen only runtime functions.
Port r20252 (d0f806b) Original commit message: This splits all runtime function into 3 categories: 1) RUNTIME: implemented in runtime and called from both full and optimized code. 2) RUNTIME_HIDDEN: implemented in runtime, never called directly from JS builtins. 3) INLINE: inlined in both full and optimized code 4) INLINE_OPTIMIZED: inlined in optimized code, implemented in runtime for full code. BUG= R=plind44@gmail.com Review URL: https://codereview.chromium.org/211453002 Patch from Balazs Kilvady <kilvadyb@homejinni.com>. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20257 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
839588d411
commit
590707184d
@ -77,7 +77,7 @@ void NumberToStringStub::InitializeInterfaceDescriptor(
|
||||
descriptor->register_param_count_ = 1;
|
||||
descriptor->register_params_ = registers;
|
||||
descriptor->deoptimization_handler_ =
|
||||
Runtime::FunctionForId(Runtime::kNumberToString)->entry;
|
||||
Runtime::FunctionForId(Runtime::kHiddenNumberToString)->entry;
|
||||
}
|
||||
|
||||
|
||||
@ -142,7 +142,7 @@ void RegExpConstructResultStub::InitializeInterfaceDescriptor(
|
||||
descriptor->register_param_count_ = 3;
|
||||
descriptor->register_params_ = registers;
|
||||
descriptor->deoptimization_handler_ =
|
||||
Runtime::FunctionForId(Runtime::kRegExpConstructResult)->entry;
|
||||
Runtime::FunctionForId(Runtime::kHiddenRegExpConstructResult)->entry;
|
||||
}
|
||||
|
||||
|
||||
@ -386,7 +386,7 @@ void StringAddStub::InitializeInterfaceDescriptor(
|
||||
descriptor->register_param_count_ = 2;
|
||||
descriptor->register_params_ = registers;
|
||||
descriptor->deoptimization_handler_ =
|
||||
Runtime::FunctionForId(Runtime::kStringAdd)->entry;
|
||||
Runtime::FunctionForId(Runtime::kHiddenStringAdd)->entry;
|
||||
}
|
||||
|
||||
|
||||
@ -2589,7 +2589,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
|
||||
// time or if regexp entry in generated code is turned off runtime switch or
|
||||
// at compilation.
|
||||
#ifdef V8_INTERPRETED_REGEXP
|
||||
__ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
|
||||
__ TailCallRuntime(Runtime::kHiddenRegExpExec, 4, 1);
|
||||
#else // V8_INTERPRETED_REGEXP
|
||||
|
||||
// Stack frame on entry.
|
||||
@ -2981,7 +2981,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
|
||||
|
||||
// Do the runtime call to execute the regexp.
|
||||
__ bind(&runtime);
|
||||
__ TailCallRuntime(Runtime::kRegExpExec, 4, 1);
|
||||
__ TailCallRuntime(Runtime::kHiddenRegExpExec, 4, 1);
|
||||
|
||||
// Deferred code for string handling.
|
||||
// (6) Not a long external string? If yes, go to (8).
|
||||
@ -3388,7 +3388,7 @@ void StringCharCodeAtGenerator::GenerateSlow(
|
||||
call_helper.BeforeCall(masm);
|
||||
__ sll(index_, index_, kSmiTagSize);
|
||||
__ Push(object_, index_);
|
||||
__ CallRuntime(Runtime::kStringCharCodeAt, 2);
|
||||
__ CallRuntime(Runtime::kHiddenStringCharCodeAt, 2);
|
||||
|
||||
__ Move(result_, v0);
|
||||
|
||||
@ -3823,7 +3823,7 @@ void SubStringStub::Generate(MacroAssembler* masm) {
|
||||
|
||||
// Just jump to runtime to create the sub string.
|
||||
__ bind(&runtime);
|
||||
__ TailCallRuntime(Runtime::kSubString, 3, 1);
|
||||
__ TailCallRuntime(Runtime::kHiddenSubString, 3, 1);
|
||||
|
||||
__ bind(&single_char);
|
||||
// v0: original string
|
||||
@ -3988,7 +3988,7 @@ void StringCompareStub::Generate(MacroAssembler* masm) {
|
||||
GenerateCompareFlatAsciiStrings(masm, a1, a0, a2, a3, t0, t1);
|
||||
|
||||
__ bind(&runtime);
|
||||
__ TailCallRuntime(Runtime::kStringCompare, 2, 1);
|
||||
__ TailCallRuntime(Runtime::kHiddenStringCompare, 2, 1);
|
||||
}
|
||||
|
||||
|
||||
@ -4499,7 +4499,7 @@ void ICCompareStub::GenerateStrings(MacroAssembler* masm) {
|
||||
if (equality) {
|
||||
__ TailCallRuntime(Runtime::kStringEquals, 2, 1);
|
||||
} else {
|
||||
__ TailCallRuntime(Runtime::kStringCompare, 2, 1);
|
||||
__ TailCallRuntime(Runtime::kHiddenStringCompare, 2, 1);
|
||||
}
|
||||
|
||||
__ bind(&miss);
|
||||
|
@ -3424,7 +3424,7 @@ void FullCodeGenerator::EmitLog(CallRuntime* expr) {
|
||||
if (CodeGenerator::ShouldGenerateLog(isolate(), args->at(0))) {
|
||||
VisitForStackValue(args->at(1));
|
||||
VisitForStackValue(args->at(2));
|
||||
__ CallRuntime(Runtime::kLog, 2);
|
||||
__ CallRuntime(Runtime::kHiddenLog, 2);
|
||||
}
|
||||
|
||||
// Finally, we're expected to leave a value on the top of the stack.
|
||||
@ -3912,7 +3912,7 @@ void FullCodeGenerator::EmitGetFromCache(CallRuntime* expr) {
|
||||
__ bind(¬_found);
|
||||
// Call runtime to perform the lookup.
|
||||
__ Push(cache, key);
|
||||
__ CallRuntime(Runtime::kGetFromCache, 2);
|
||||
__ CallRuntime(Runtime::kHiddenGetFromCache, 2);
|
||||
|
||||
__ bind(&done);
|
||||
context()->Plug(v0);
|
||||
@ -4193,8 +4193,8 @@ void FullCodeGenerator::EmitFastAsciiArrayJoin(CallRuntime* expr) {
|
||||
|
||||
|
||||
void FullCodeGenerator::VisitCallRuntime(CallRuntime* expr) {
|
||||
Handle<String> name = expr->name();
|
||||
if (name->length() > 0 && name->Get(0) == '_') {
|
||||
if (expr->function() != NULL &&
|
||||
expr->function()->intrinsic_type == Runtime::INLINE) {
|
||||
Comment cmnt(masm_, "[ InlineRuntimeCall");
|
||||
EmitInlineRuntimeCall(expr);
|
||||
return;
|
||||
|
@ -4484,7 +4484,7 @@ void LCodeGen::DoDeferredStringCharCodeAt(LStringCharCodeAt* instr) {
|
||||
__ SmiTag(index);
|
||||
__ push(index);
|
||||
}
|
||||
CallRuntimeFromDeferred(Runtime::kStringCharCodeAt, 2, instr,
|
||||
CallRuntimeFromDeferred(Runtime::kHiddenStringCharCodeAt, 2, instr,
|
||||
instr->context());
|
||||
__ AssertSmi(v0);
|
||||
__ SmiUntag(v0);
|
||||
|
Loading…
Reference in New Issue
Block a user