Remove broken %_Log functionality.
R=yangguo@chromium.org BUG= Review URL: https://codereview.chromium.org/265283007 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21160 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
5fb7132777
commit
55c077f96e
@ -3329,28 +3329,6 @@ void FullCodeGenerator::EmitClassOf(CallRuntime* expr) {
|
||||
}
|
||||
|
||||
|
||||
void FullCodeGenerator::EmitLog(CallRuntime* expr) {
|
||||
// Conditionally generate a log call.
|
||||
// Args:
|
||||
// 0 (literal string): The type of logging (corresponds to the flags).
|
||||
// This is used to determine whether or not to generate the log call.
|
||||
// 1 (string): Format string. Access the string at argument index 2
|
||||
// with '%2s' (see Logger::LogRuntime for all the formats).
|
||||
// 2 (array): Arguments to the format string.
|
||||
ZoneList<Expression*>* args = expr->arguments();
|
||||
ASSERT_EQ(args->length(), 3);
|
||||
if (CodeGenerator::ShouldGenerateLog(isolate(), args->at(0))) {
|
||||
VisitForStackValue(args->at(1));
|
||||
VisitForStackValue(args->at(2));
|
||||
__ CallRuntime(Runtime::kHiddenLog, 2);
|
||||
}
|
||||
|
||||
// Finally, we're expected to leave a value on the top of the stack.
|
||||
__ LoadRoot(r0, Heap::kUndefinedValueRootIndex);
|
||||
context()->Plug(r0);
|
||||
}
|
||||
|
||||
|
||||
void FullCodeGenerator::EmitSubString(CallRuntime* expr) {
|
||||
// Load the arguments on the stack and call the stub.
|
||||
SubStringStub stub(isolate());
|
||||
|
@ -2447,14 +2447,6 @@ bool MacroAssembler::AllowThisStubCall(CodeStub* stub) {
|
||||
}
|
||||
|
||||
|
||||
void MacroAssembler::IllegalOperation(int num_arguments) {
|
||||
if (num_arguments > 0) {
|
||||
add(sp, sp, Operand(num_arguments * kPointerSize));
|
||||
}
|
||||
LoadRoot(r0, Heap::kUndefinedValueRootIndex);
|
||||
}
|
||||
|
||||
|
||||
void MacroAssembler::IndexFromHash(Register hash, Register index) {
|
||||
// If the hash field contains an array index pick it out. The assert checks
|
||||
// that the constants for the maximum number of digits for an array index
|
||||
@ -2650,10 +2642,7 @@ void MacroAssembler::CallRuntime(const Runtime::Function* f,
|
||||
// If the expected number of arguments of the runtime function is
|
||||
// constant, we check that the actual number of arguments match the
|
||||
// expectation.
|
||||
if (f->nargs >= 0 && f->nargs != num_arguments) {
|
||||
IllegalOperation(num_arguments);
|
||||
return;
|
||||
}
|
||||
CHECK(f->nargs < 0 || f->nargs == num_arguments);
|
||||
|
||||
// TODO(1236192): Most runtime routines don't need the number of
|
||||
// arguments passed in because it is constant. At some point we
|
||||
|
@ -930,10 +930,6 @@ class MacroAssembler: public Assembler {
|
||||
}
|
||||
|
||||
|
||||
// Generates code for reporting that an illegal operation has
|
||||
// occurred.
|
||||
void IllegalOperation(int num_arguments);
|
||||
|
||||
// Picks out an array index from the hash field.
|
||||
// Register use:
|
||||
// hash - holds the index's hash. Clobbered.
|
||||
|
@ -3065,28 +3065,6 @@ void FullCodeGenerator::EmitClassOf(CallRuntime* expr) {
|
||||
}
|
||||
|
||||
|
||||
void FullCodeGenerator::EmitLog(CallRuntime* expr) {
|
||||
// Conditionally generate a log call.
|
||||
// Args:
|
||||
// 0 (literal string): The type of logging (corresponds to the flags).
|
||||
// This is used to determine whether or not to generate the log call.
|
||||
// 1 (string): Format string. Access the string at argument index 2
|
||||
// with '%2s' (see Logger::LogRuntime for all the formats).
|
||||
// 2 (array): Arguments to the format string.
|
||||
ZoneList<Expression*>* args = expr->arguments();
|
||||
ASSERT_EQ(args->length(), 3);
|
||||
if (CodeGenerator::ShouldGenerateLog(isolate(), args->at(0))) {
|
||||
VisitForStackValue(args->at(1));
|
||||
VisitForStackValue(args->at(2));
|
||||
__ CallRuntime(Runtime::kHiddenLog, 2);
|
||||
}
|
||||
|
||||
// Finally, we're expected to leave a value on the top of the stack.
|
||||
__ LoadRoot(x0, Heap::kUndefinedValueRootIndex);
|
||||
context()->Plug(x0);
|
||||
}
|
||||
|
||||
|
||||
void FullCodeGenerator::EmitSubString(CallRuntime* expr) {
|
||||
// Load the arguments on the stack and call the stub.
|
||||
SubStringStub stub(isolate());
|
||||
|
@ -1673,14 +1673,7 @@ void MacroAssembler::CallRuntime(const Runtime::Function* f,
|
||||
|
||||
// Check that the number of arguments matches what the function expects.
|
||||
// If f->nargs is -1, the function can accept a variable number of arguments.
|
||||
if (f->nargs >= 0 && f->nargs != num_arguments) {
|
||||
// Illegal operation: drop the stack arguments and return undefined.
|
||||
if (num_arguments > 0) {
|
||||
Drop(num_arguments);
|
||||
}
|
||||
LoadRoot(x0, Heap::kUndefinedValueRootIndex);
|
||||
return;
|
||||
}
|
||||
CHECK(f->nargs < 0 || f->nargs == num_arguments);
|
||||
|
||||
// Place the necessary arguments.
|
||||
Mov(x0, num_arguments);
|
||||
|
@ -165,21 +165,6 @@ void CodeGenerator::PrintCode(Handle<Code> code, CompilationInfo* info) {
|
||||
}
|
||||
|
||||
|
||||
bool CodeGenerator::ShouldGenerateLog(Isolate* isolate, Expression* type) {
|
||||
ASSERT(type != NULL);
|
||||
if (!isolate->logger()->is_logging() &&
|
||||
!isolate->cpu_profiler()->is_profiling()) {
|
||||
return false;
|
||||
}
|
||||
Handle<String> name = Handle<String>::cast(type->AsLiteral()->value());
|
||||
if (FLAG_log_regexp) {
|
||||
if (name->IsOneByteEqualTo(STATIC_ASCII_VECTOR("regexp")))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool CodeGenerator::RecordPositions(MacroAssembler* masm,
|
||||
int pos,
|
||||
bool right_here) {
|
||||
|
@ -79,8 +79,6 @@ class CodeGenerator {
|
||||
// Print the code after compiling it.
|
||||
static void PrintCode(Handle<Code> code, CompilationInfo* info);
|
||||
|
||||
static bool ShouldGenerateLog(Isolate* isolate, Expression* type);
|
||||
|
||||
static bool RecordPositions(MacroAssembler* masm,
|
||||
int pos,
|
||||
bool right_here = false);
|
||||
|
@ -776,7 +776,6 @@ DEFINE_bool(trace_regexp_assembler, false,
|
||||
DEFINE_bool(log, false,
|
||||
"Minimal logging (no API, code, GC, suspect, or handles samples).")
|
||||
DEFINE_bool(log_all, false, "Log all events to the log file.")
|
||||
DEFINE_bool(log_runtime, false, "Activate runtime system %Log call.")
|
||||
DEFINE_bool(log_api, false, "Log API events to the log file.")
|
||||
DEFINE_bool(log_code, false,
|
||||
"Log code events to the log file without profiling.")
|
||||
|
@ -10796,12 +10796,6 @@ void HOptimizedGraphBuilder::GenerateObjectEquals(CallRuntime* call) {
|
||||
}
|
||||
|
||||
|
||||
void HOptimizedGraphBuilder::GenerateLog(CallRuntime* call) {
|
||||
// %_Log is ignored in optimized code.
|
||||
return ast_context()->ReturnValue(graph()->GetConstantUndefined());
|
||||
}
|
||||
|
||||
|
||||
// Fast support for StringAdd.
|
||||
void HOptimizedGraphBuilder::GenerateStringAdd(CallRuntime* call) {
|
||||
ASSERT_EQ(2, call->arguments()->length());
|
||||
|
@ -3279,27 +3279,6 @@ void FullCodeGenerator::EmitClassOf(CallRuntime* expr) {
|
||||
}
|
||||
|
||||
|
||||
void FullCodeGenerator::EmitLog(CallRuntime* expr) {
|
||||
// Conditionally generate a log call.
|
||||
// Args:
|
||||
// 0 (literal string): The type of logging (corresponds to the flags).
|
||||
// This is used to determine whether or not to generate the log call.
|
||||
// 1 (string): Format string. Access the string at argument index 2
|
||||
// with '%2s' (see Logger::LogRuntime for all the formats).
|
||||
// 2 (array): Arguments to the format string.
|
||||
ZoneList<Expression*>* args = expr->arguments();
|
||||
ASSERT_EQ(args->length(), 3);
|
||||
if (CodeGenerator::ShouldGenerateLog(isolate(), args->at(0))) {
|
||||
VisitForStackValue(args->at(1));
|
||||
VisitForStackValue(args->at(2));
|
||||
__ CallRuntime(Runtime::kHiddenLog, 2);
|
||||
}
|
||||
// Finally, we're expected to leave a value on the top of the stack.
|
||||
__ mov(eax, isolate()->factory()->undefined_value());
|
||||
context()->Plug(eax);
|
||||
}
|
||||
|
||||
|
||||
void FullCodeGenerator::EmitSubString(CallRuntime* expr) {
|
||||
// Load the arguments on the stack and call the stub.
|
||||
SubStringStub stub(isolate());
|
||||
|
@ -2179,14 +2179,6 @@ bool MacroAssembler::AllowThisStubCall(CodeStub* stub) {
|
||||
}
|
||||
|
||||
|
||||
void MacroAssembler::IllegalOperation(int num_arguments) {
|
||||
if (num_arguments > 0) {
|
||||
add(esp, Immediate(num_arguments * kPointerSize));
|
||||
}
|
||||
mov(eax, Immediate(isolate()->factory()->undefined_value()));
|
||||
}
|
||||
|
||||
|
||||
void MacroAssembler::IndexFromHash(Register hash, Register index) {
|
||||
// The assert checks that the constants for the maximum number of digits
|
||||
// for an array index cached in the hash field and the number of bits
|
||||
@ -2212,10 +2204,7 @@ void MacroAssembler::CallRuntime(const Runtime::Function* f,
|
||||
// If the expected number of arguments of the runtime function is
|
||||
// constant, we check that the actual number of arguments match the
|
||||
// expectation.
|
||||
if (f->nargs >= 0 && f->nargs != num_arguments) {
|
||||
IllegalOperation(num_arguments);
|
||||
return;
|
||||
}
|
||||
CHECK(f->nargs < 0 || f->nargs == num_arguments);
|
||||
|
||||
// TODO(1236192): Most runtime routines don't need the number of
|
||||
// arguments passed in because it is constant. At some point we
|
||||
|
@ -702,10 +702,6 @@ class MacroAssembler: public Assembler {
|
||||
Label* miss,
|
||||
bool miss_on_bound_function = false);
|
||||
|
||||
// Generates code for reporting that an illegal operation has
|
||||
// occurred.
|
||||
void IllegalOperation(int num_arguments);
|
||||
|
||||
// Picks out an array index from the hash field.
|
||||
// Register use:
|
||||
// hash - holds the index's hash. Clobbered.
|
||||
|
@ -28,7 +28,6 @@ void Log::Initialize(const char* log_file_name) {
|
||||
|
||||
// --log-all enables all the log flags.
|
||||
if (FLAG_log_all) {
|
||||
FLAG_log_runtime = true;
|
||||
FLAG_log_api = true;
|
||||
FLAG_log_code = true;
|
||||
FLAG_log_gc = true;
|
||||
|
@ -22,10 +22,10 @@ class Log {
|
||||
void stop() { is_stopped_ = true; }
|
||||
|
||||
static bool InitLogAtStart() {
|
||||
return FLAG_log || FLAG_log_runtime || FLAG_log_api
|
||||
|| FLAG_log_code || FLAG_log_gc || FLAG_log_handles || FLAG_log_suspect
|
||||
|| FLAG_log_regexp || FLAG_ll_prof || FLAG_perf_basic_prof
|
||||
|| FLAG_perf_jit_prof || FLAG_log_internal_timer_events;
|
||||
return FLAG_log || FLAG_log_api || FLAG_log_code || FLAG_log_gc
|
||||
|| FLAG_log_handles || FLAG_log_suspect || FLAG_log_regexp
|
||||
|| FLAG_ll_prof || FLAG_perf_basic_prof || FLAG_perf_jit_prof
|
||||
|| FLAG_log_internal_timer_events;
|
||||
}
|
||||
|
||||
// Frees all resources acquired in Initialize and Open... functions.
|
||||
|
41
src/log.cc
41
src/log.cc
@ -1178,47 +1178,6 @@ void Logger::RegExpCompileEvent(Handle<JSRegExp> regexp, bool in_cache) {
|
||||
}
|
||||
|
||||
|
||||
void Logger::LogRuntime(Vector<const char> format,
|
||||
Handle<JSArray> args) {
|
||||
if (!log_->IsEnabled() || !FLAG_log_runtime) return;
|
||||
Log::MessageBuilder msg(log_);
|
||||
for (int i = 0; i < format.length(); i++) {
|
||||
char c = format[i];
|
||||
if (c == '%' && i <= format.length() - 2) {
|
||||
i++;
|
||||
ASSERT('0' <= format[i] && format[i] <= '9');
|
||||
// No exception expected when getting an element from an array literal.
|
||||
Handle<Object> obj = Object::GetElement(
|
||||
isolate_, args, format[i] - '0').ToHandleChecked();
|
||||
i++;
|
||||
switch (format[i]) {
|
||||
case 's':
|
||||
msg.AppendDetailed(String::cast(*obj), false);
|
||||
break;
|
||||
case 'S':
|
||||
msg.AppendDetailed(String::cast(*obj), true);
|
||||
break;
|
||||
case 'r':
|
||||
Logger::LogRegExpSource(Handle<JSRegExp>::cast(obj));
|
||||
break;
|
||||
case 'x':
|
||||
msg.Append("0x%x", Smi::cast(*obj)->value());
|
||||
break;
|
||||
case 'i':
|
||||
msg.Append("%i", Smi::cast(*obj)->value());
|
||||
break;
|
||||
default:
|
||||
UNREACHABLE();
|
||||
}
|
||||
} else {
|
||||
msg.Append(c);
|
||||
}
|
||||
}
|
||||
msg.Append('\n');
|
||||
msg.WriteToLogFile();
|
||||
}
|
||||
|
||||
|
||||
void Logger::ApiIndexedSecurityCheck(uint32_t index) {
|
||||
if (!log_->IsEnabled() || !FLAG_log_api) return;
|
||||
ApiEvent("api,check-security,%u\n", index);
|
||||
|
@ -326,9 +326,6 @@ class Logger {
|
||||
|
||||
void RegExpCompileEvent(Handle<JSRegExp> regexp, bool in_cache);
|
||||
|
||||
// Log an event reported from generated code
|
||||
void LogRuntime(Vector<const char> format, Handle<JSArray> args);
|
||||
|
||||
bool is_logging() {
|
||||
return is_logging_;
|
||||
}
|
||||
|
@ -3348,28 +3348,6 @@ void FullCodeGenerator::EmitClassOf(CallRuntime* expr) {
|
||||
}
|
||||
|
||||
|
||||
void FullCodeGenerator::EmitLog(CallRuntime* expr) {
|
||||
// Conditionally generate a log call.
|
||||
// Args:
|
||||
// 0 (literal string): The type of logging (corresponds to the flags).
|
||||
// This is used to determine whether or not to generate the log call.
|
||||
// 1 (string): Format string. Access the string at argument index 2
|
||||
// with '%2s' (see Logger::LogRuntime for all the formats).
|
||||
// 2 (array): Arguments to the format string.
|
||||
ZoneList<Expression*>* args = expr->arguments();
|
||||
ASSERT_EQ(args->length(), 3);
|
||||
if (CodeGenerator::ShouldGenerateLog(isolate(), args->at(0))) {
|
||||
VisitForStackValue(args->at(1));
|
||||
VisitForStackValue(args->at(2));
|
||||
__ CallRuntime(Runtime::kHiddenLog, 2);
|
||||
}
|
||||
|
||||
// Finally, we're expected to leave a value on the top of the stack.
|
||||
__ LoadRoot(v0, Heap::kUndefinedValueRootIndex);
|
||||
context()->Plug(v0);
|
||||
}
|
||||
|
||||
|
||||
void FullCodeGenerator::EmitSubString(CallRuntime* expr) {
|
||||
// Load the arguments on the stack and call the stub.
|
||||
SubStringStub stub(isolate());
|
||||
|
@ -4015,14 +4015,6 @@ bool MacroAssembler::AllowThisStubCall(CodeStub* stub) {
|
||||
}
|
||||
|
||||
|
||||
void MacroAssembler::IllegalOperation(int num_arguments) {
|
||||
if (num_arguments > 0) {
|
||||
addiu(sp, sp, num_arguments * kPointerSize);
|
||||
}
|
||||
LoadRoot(v0, Heap::kUndefinedValueRootIndex);
|
||||
}
|
||||
|
||||
|
||||
void MacroAssembler::IndexFromHash(Register hash,
|
||||
Register index) {
|
||||
// If the hash field contains an array index pick it out. The assert checks
|
||||
@ -4177,10 +4169,7 @@ void MacroAssembler::CallRuntime(const Runtime::Function* f,
|
||||
// If the expected number of arguments of the runtime function is
|
||||
// constant, we check that the actual number of arguments match the
|
||||
// expectation.
|
||||
if (f->nargs >= 0 && f->nargs != num_arguments) {
|
||||
IllegalOperation(num_arguments);
|
||||
return;
|
||||
}
|
||||
CHECK(f->nargs < 0 || f->nargs == num_arguments);
|
||||
|
||||
// TODO(1236192): Most runtime routines don't need the number of
|
||||
// arguments passed in because it is constant. At some point we
|
||||
|
@ -1048,10 +1048,6 @@ class MacroAssembler: public Assembler {
|
||||
Handle<Code> success,
|
||||
SmiCheckType smi_check_type);
|
||||
|
||||
// Generates code for reporting that an illegal operation has
|
||||
// occurred.
|
||||
void IllegalOperation(int num_arguments);
|
||||
|
||||
|
||||
// Load and check the instance type of an object for being a string.
|
||||
// Loads the type into the second argument register.
|
||||
|
@ -162,7 +162,6 @@ function RegExpExec(string) {
|
||||
i = 0;
|
||||
}
|
||||
|
||||
%_Log('regexp', 'regexp-exec,%0r,%1S,%2i', [this, string, lastIndex]);
|
||||
// matchIndices is either null or the lastMatchInfo array.
|
||||
var matchIndices = %_RegExpExec(this, string, i, lastMatchInfo);
|
||||
|
||||
@ -206,7 +205,6 @@ function RegExpTest(string) {
|
||||
this.lastIndex = 0;
|
||||
return false;
|
||||
}
|
||||
%_Log('regexp', 'regexp-exec,%0r,%1S,%2i', [this, string, lastIndex]);
|
||||
// matchIndices is either null or the lastMatchInfo array.
|
||||
var matchIndices = %_RegExpExec(this, string, i, lastMatchInfo);
|
||||
if (IS_NULL(matchIndices)) {
|
||||
@ -227,7 +225,6 @@ function RegExpTest(string) {
|
||||
%_StringCharCodeAt(regexp.source, 2) != 63) { // '?'
|
||||
regexp = TrimRegExp(regexp);
|
||||
}
|
||||
%_Log('regexp', 'regexp-exec,%0r,%1S,%2i', [regexp, string, lastIndex]);
|
||||
// matchIndices is either null or the lastMatchInfo array.
|
||||
var matchIndices = %_RegExpExec(regexp, string, 0, lastMatchInfo);
|
||||
if (IS_NULL(matchIndices)) {
|
||||
|
@ -14799,19 +14799,6 @@ RUNTIME_FUNCTION(Runtime_ListNatives) {
|
||||
#endif
|
||||
|
||||
|
||||
RUNTIME_FUNCTION(RuntimeHidden_Log) {
|
||||
HandleScope handle_scope(isolate);
|
||||
ASSERT(args.length() == 2);
|
||||
CONVERT_ARG_HANDLE_CHECKED(String, format, 0);
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSArray, elms, 1);
|
||||
|
||||
SmartArrayPointer<char> format_chars = format->ToCString();
|
||||
isolate->logger()->LogRuntime(
|
||||
Vector<const char>(format_chars.get(), format->length()), elms);
|
||||
return isolate->heap()->undefined_value();
|
||||
}
|
||||
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_IS_VAR) {
|
||||
UNREACHABLE(); // implemented as macro in the parser
|
||||
return NULL;
|
||||
|
@ -544,7 +544,6 @@ namespace internal {
|
||||
F(SubString, 3, 1) \
|
||||
F(StringCompare, 2, 1) \
|
||||
F(StringCharCodeAt, 2, 1) \
|
||||
F(Log, 3, 1) \
|
||||
F(GetFromCache, 2, 1) \
|
||||
\
|
||||
/* Compilation */ \
|
||||
@ -657,7 +656,6 @@ namespace internal {
|
||||
F(DebugBreakInOptimizedCode, 0, 1) \
|
||||
F(ClassOf, 1, 1) \
|
||||
F(StringCharCodeAt, 2, 1) \
|
||||
F(Log, 3, 1) \
|
||||
F(StringAdd, 2, 1) \
|
||||
F(SubString, 3, 1) \
|
||||
F(StringCompare, 2, 1) \
|
||||
|
@ -150,7 +150,6 @@ function StringMatch(regexp) {
|
||||
var lastIndex = regexp.lastIndex;
|
||||
TO_INTEGER_FOR_SIDE_EFFECT(lastIndex);
|
||||
if (!regexp.global) return RegExpExecNoTests(regexp, subject, 0);
|
||||
%_Log('regexp', 'regexp-match,%0S,%1r', [subject, regexp]);
|
||||
// lastMatchInfo is defined in regexp.js.
|
||||
var result = %StringMatch(subject, regexp, lastMatchInfo);
|
||||
if (result !== null) lastMatchInfoOverride = null;
|
||||
@ -221,7 +220,6 @@ function StringReplace(search, replace) {
|
||||
// value is discarded.
|
||||
var lastIndex = search.lastIndex;
|
||||
TO_INTEGER_FOR_SIDE_EFFECT(lastIndex);
|
||||
%_Log('regexp', 'regexp-replace,%0r,%1S', [search, subject]);
|
||||
|
||||
if (!IS_SPEC_FUNCTION(replace)) {
|
||||
replace = TO_STRING_INLINE(replace);
|
||||
@ -623,8 +621,6 @@ function StringSplit(separator, limit) {
|
||||
var ArrayPushBuiltin = $Array.prototype.push;
|
||||
|
||||
function StringSplitOnRegExp(subject, separator, limit, length) {
|
||||
%_Log('regexp', 'regexp-split,%0S,%1r', [subject, separator]);
|
||||
|
||||
if (length === 0) {
|
||||
if (DoRegExpExec(separator, subject, 0, 0) != null) {
|
||||
return [];
|
||||
|
@ -3268,27 +3268,6 @@ void FullCodeGenerator::EmitClassOf(CallRuntime* expr) {
|
||||
}
|
||||
|
||||
|
||||
void FullCodeGenerator::EmitLog(CallRuntime* expr) {
|
||||
// Conditionally generate a log call.
|
||||
// Args:
|
||||
// 0 (literal string): The type of logging (corresponds to the flags).
|
||||
// This is used to determine whether or not to generate the log call.
|
||||
// 1 (string): Format string. Access the string at argument index 2
|
||||
// with '%2s' (see Logger::LogRuntime for all the formats).
|
||||
// 2 (array): Arguments to the format string.
|
||||
ZoneList<Expression*>* args = expr->arguments();
|
||||
ASSERT_EQ(args->length(), 3);
|
||||
if (CodeGenerator::ShouldGenerateLog(isolate(), args->at(0))) {
|
||||
VisitForStackValue(args->at(1));
|
||||
VisitForStackValue(args->at(2));
|
||||
__ CallRuntime(Runtime::kHiddenLog, 2);
|
||||
}
|
||||
// Finally, we're expected to leave a value on the top of the stack.
|
||||
__ LoadRoot(rax, Heap::kUndefinedValueRootIndex);
|
||||
context()->Plug(rax);
|
||||
}
|
||||
|
||||
|
||||
void FullCodeGenerator::EmitSubString(CallRuntime* expr) {
|
||||
// Load the arguments on the stack and call the stub.
|
||||
SubStringStub stub(isolate());
|
||||
|
@ -542,14 +542,6 @@ bool MacroAssembler::AllowThisStubCall(CodeStub* stub) {
|
||||
}
|
||||
|
||||
|
||||
void MacroAssembler::IllegalOperation(int num_arguments) {
|
||||
if (num_arguments > 0) {
|
||||
addp(rsp, Immediate(num_arguments * kPointerSize));
|
||||
}
|
||||
LoadRoot(rax, Heap::kUndefinedValueRootIndex);
|
||||
}
|
||||
|
||||
|
||||
void MacroAssembler::IndexFromHash(Register hash, Register index) {
|
||||
// The assert checks that the constants for the maximum number of digits
|
||||
// for an array index cached in the hash field and the number of bits
|
||||
@ -575,10 +567,7 @@ void MacroAssembler::CallRuntime(const Runtime::Function* f,
|
||||
// If the expected number of arguments of the runtime function is
|
||||
// constant, we check that the actual number of arguments match the
|
||||
// expectation.
|
||||
if (f->nargs >= 0 && f->nargs != num_arguments) {
|
||||
IllegalOperation(num_arguments);
|
||||
return;
|
||||
}
|
||||
CHECK(f->nargs < 0 || f->nargs == num_arguments);
|
||||
|
||||
// TODO(1236192): Most runtime routines don't need the number of
|
||||
// arguments passed in because it is constant. At some point we
|
||||
|
@ -1205,10 +1205,6 @@ class MacroAssembler: public Assembler {
|
||||
Label* miss,
|
||||
bool miss_on_bound_function = false);
|
||||
|
||||
// Generates code for reporting that an illegal operation has
|
||||
// occurred.
|
||||
void IllegalOperation(int num_arguments);
|
||||
|
||||
// Picks out an array index from the hash field.
|
||||
// Register use:
|
||||
// hash - holds the index's hash. Clobbered.
|
||||
|
Loading…
Reference in New Issue
Block a user