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

Side by Side Diff: src/builtins.cc

Issue 587213002: Fix serializing ICs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: added TODO Created 6 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/code-stubs.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/arguments.h" 8 #include "src/arguments.h"
9 #include "src/base/once.h" 9 #include "src/base/once.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 1544 matching lines...) Expand 10 before | Expand all | Expand 10 after
1555 typedef void (*Generator)(MacroAssembler*, int, BuiltinExtraArguments); 1555 typedef void (*Generator)(MacroAssembler*, int, BuiltinExtraArguments);
1556 Generator g = FUNCTION_CAST<Generator>(functions[i].generator); 1556 Generator g = FUNCTION_CAST<Generator>(functions[i].generator);
1557 // We pass all arguments to the generator, but it may not use all of 1557 // We pass all arguments to the generator, but it may not use all of
1558 // them. This works because the first arguments are on top of the 1558 // them. This works because the first arguments are on top of the
1559 // stack. 1559 // stack.
1560 DCHECK(!masm.has_frame()); 1560 DCHECK(!masm.has_frame());
1561 g(&masm, functions[i].name, functions[i].extra_args); 1561 g(&masm, functions[i].name, functions[i].extra_args);
1562 // Move the code into the object heap. 1562 // Move the code into the object heap.
1563 CodeDesc desc; 1563 CodeDesc desc;
1564 masm.GetCode(&desc); 1564 masm.GetCode(&desc);
1565 Code::Flags flags = functions[i].flags; 1565 Code::Flags flags = functions[i].flags;
1566 Handle<Code> code = 1566 Handle<Code> code =
1567 isolate->factory()->NewCode(desc, flags, masm.CodeObject()); 1567 isolate->factory()->NewCode(desc, flags, masm.CodeObject());
1568 // Log the event and add the code to the builtins array. 1568 // Log the event and add the code to the builtins array.
1569 PROFILE(isolate, 1569 PROFILE(isolate,
1570 CodeCreateEvent(Logger::BUILTIN_TAG, *code, functions[i].s_name)); 1570 CodeCreateEvent(Logger::BUILTIN_TAG, *code, functions[i].s_name));
1571 builtins_[i] = *code; 1571 builtins_[i] = *code;
1572 if (code->kind() == Code::BUILTIN) code->set_builtin_index(i); 1572 if (code->kind() == Code::BUILTIN) code->set_builtin_index(i);
1573 #ifdef ENABLE_DISASSEMBLER 1573 #ifdef ENABLE_DISASSEMBLER
1574 if (FLAG_print_builtin_code) { 1574 if (FLAG_print_builtin_code) {
1575 CodeTracer::Scope trace_scope(isolate->GetCodeTracer()); 1575 CodeTracer::Scope trace_scope(isolate->GetCodeTracer());
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
1645 } 1645 }
1646 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C) 1646 BUILTIN_LIST_C(DEFINE_BUILTIN_ACCESSOR_C)
1647 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A) 1647 BUILTIN_LIST_A(DEFINE_BUILTIN_ACCESSOR_A)
1648 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) 1648 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H)
1649 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) 1649 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A)
1650 #undef DEFINE_BUILTIN_ACCESSOR_C 1650 #undef DEFINE_BUILTIN_ACCESSOR_C
1651 #undef DEFINE_BUILTIN_ACCESSOR_A 1651 #undef DEFINE_BUILTIN_ACCESSOR_A
1652 1652
1653 1653
1654 } } // namespace v8::internal 1654 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/code-stubs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698