diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2013-08-10 16:27:43 +0200 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2013-08-10 16:27:43 +0200 |
commit | f69be329f0d78f19e71ac9e75d6e4ee816e13c97 (patch) | |
tree | 022e53d1aff74dbe50f3984c154461bf6c19efb0 /deps/v8/src/code-stubs.cc | |
parent | 39aa894035f9e3b58e04ce1a2b598e496e1f6bd6 (diff) | |
download | node-f69be329f0d78f19e71ac9e75d6e4ee816e13c97.tar.gz |
v8: upgrade v8 to 3.20.14.1
Diffstat (limited to 'deps/v8/src/code-stubs.cc')
-rw-r--r-- | deps/v8/src/code-stubs.cc | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/deps/v8/src/code-stubs.cc b/deps/v8/src/code-stubs.cc index 5f6616ea0..d472fa287 100644 --- a/deps/v8/src/code-stubs.cc +++ b/deps/v8/src/code-stubs.cc @@ -204,71 +204,6 @@ void CodeStub::PrintName(StringStream* stream) { } -Builtins::JavaScript UnaryOpStub::ToJSBuiltin() { - switch (operation_) { - default: - UNREACHABLE(); - case Token::SUB: - return Builtins::UNARY_MINUS; - case Token::BIT_NOT: - return Builtins::BIT_NOT; - } -} - - -Handle<JSFunction> UnaryOpStub::ToJSFunction(Isolate* isolate) { - Handle<JSBuiltinsObject> builtins(isolate->js_builtins_object()); - Object* builtin = builtins->javascript_builtin(ToJSBuiltin()); - return Handle<JSFunction>(JSFunction::cast(builtin), isolate); -} - - -MaybeObject* UnaryOpStub::Result(Handle<Object> object, Isolate* isolate) { - Handle<JSFunction> builtin_function = ToJSFunction(isolate); - bool caught_exception; - Handle<Object> result = Execution::Call(builtin_function, object, - 0, NULL, &caught_exception); - if (caught_exception) { - return Failure::Exception(); - } - return *result; -} - - -void UnaryOpStub::UpdateStatus(Handle<Object> object) { - State old_state(state_); - if (object->IsSmi()) { - state_.Add(SMI); - if (operation_ == Token::SUB && *object == 0) { - // The result (-0) has to be represented as double. - state_.Add(HEAP_NUMBER); - } - } else if (object->IsHeapNumber()) { - state_.Add(HEAP_NUMBER); - } else { - state_.Add(GENERIC); - } - TraceTransition(old_state, state_); -} - - -Handle<Type> UnaryOpStub::GetType(Isolate* isolate) { - if (state_.Contains(GENERIC)) { - return handle(Type::Any(), isolate); - } - Handle<Type> type = handle(Type::None(), isolate); - if (state_.Contains(SMI)) { - type = handle( - Type::Union(type, handle(Type::Smi(), isolate)), isolate); - } - if (state_.Contains(HEAP_NUMBER)) { - type = handle( - Type::Union(type, handle(Type::Double(), isolate)), isolate); - } - return type; -} - - void BinaryOpStub::Generate(MacroAssembler* masm) { // Explicitly allow generation of nested stubs. It is safe here because // generation code does not use any raw pointers. @@ -354,29 +289,6 @@ void BinaryOpStub::GenerateCallRuntime(MacroAssembler* masm) { #undef __ -void UnaryOpStub::PrintBaseName(StringStream* stream) { - CodeStub::PrintBaseName(stream); - if (operation_ == Token::SUB) stream->Add("Minus"); - if (operation_ == Token::BIT_NOT) stream->Add("Not"); -} - - -void UnaryOpStub::PrintState(StringStream* stream) { - state_.Print(stream); -} - - -void UnaryOpStub::State::Print(StringStream* stream) const { - stream->Add("("); - SimpleListPrinter printer(stream); - if (IsEmpty()) printer.Add("None"); - if (Contains(GENERIC)) printer.Add("Generic"); - if (Contains(HEAP_NUMBER)) printer.Add("HeapNumber"); - if (Contains(SMI)) printer.Add("Smi"); - stream->Add(")"); -} - - void BinaryOpStub::PrintName(StringStream* stream) { const char* op_name = Token::Name(op_); const char* overwrite_name; |