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

Side by Side Diff: src/codegen.cc

Issue 2957: Defer the writing of the source position data to the relocation information... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years, 3 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 | « src/codegen.h ('k') | src/codegen-ia32.cc » ('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 2007-2008 the V8 project authors. All rights reserved. 1 // Copyright 2007-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 19 matching lines...) Expand all
30 #include "codegen-inl.h" 30 #include "codegen-inl.h"
31 #include "debug.h" 31 #include "debug.h"
32 #include "runtime.h" 32 #include "runtime.h"
33 #include "stub-cache.h" 33 #include "stub-cache.h"
34 34
35 namespace v8 { namespace internal { 35 namespace v8 { namespace internal {
36 36
37 DeferredCode::DeferredCode(CodeGenerator* generator) 37 DeferredCode::DeferredCode(CodeGenerator* generator)
38 : masm_(generator->masm()), 38 : masm_(generator->masm()),
39 generator_(generator), 39 generator_(generator),
40 position_(masm_->last_position()), 40 statement_position_(masm_->last_statement_position()),
41 position_is_statement_(masm_->last_position_is_statement()) { 41 position_(masm_->last_position()) {
42 generator->AddDeferred(this); 42 generator->AddDeferred(this);
43 #ifdef DEBUG 43 #ifdef DEBUG
44 comment_ = ""; 44 comment_ = "";
45 #endif 45 #endif
46 } 46 }
47 47
48 48
49 void CodeGenerator::ProcessDeferred() { 49 void CodeGenerator::ProcessDeferred() {
50 while (!deferred_.is_empty()) { 50 while (!deferred_.is_empty()) {
51 DeferredCode* code = deferred_.RemoveLast(); 51 DeferredCode* code = deferred_.RemoveLast();
52 MacroAssembler* masm = code->masm(); 52 MacroAssembler* masm = code->masm();
53 // Record position of deferred code stub. 53 // Record position of deferred code stub.
54 if (code->position_is_statement()) { 54 if (code->statement_position() != kNoPosition) {
55 masm->RecordStatementPosition(code->position()); 55 masm->RecordStatementPosition(code->statement_position());
56 } else { 56 }
57 if (code->position() != kNoPosition) {
57 masm->RecordPosition(code->position()); 58 masm->RecordPosition(code->position());
58 } 59 }
59 // Bind labels and generate the code. 60 // Bind labels and generate the code.
60 masm->bind(code->enter()); 61 masm->bind(code->enter());
61 Comment cmnt(masm, code->comment()); 62 Comment cmnt(masm, code->comment());
62 code->Generate(); 63 code->Generate();
63 if (code->exit()->is_bound()) { 64 if (code->exit()->is_bound()) {
64 masm->jmp(code->exit()); // platform independent? 65 masm->jmp(code->exit()); // platform independent?
65 } 66 }
66 } 67 }
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 return Runtime::FunctionForId(id_)->stub_name; 255 return Runtime::FunctionForId(id_)->stub_name;
255 } 256 }
256 257
257 258
258 void RuntimeStub::Generate(MacroAssembler* masm) { 259 void RuntimeStub::Generate(MacroAssembler* masm) {
259 masm->TailCallRuntime(ExternalReference(id_), num_arguments_); 260 masm->TailCallRuntime(ExternalReference(id_), num_arguments_);
260 } 261 }
261 262
262 263
263 } } // namespace v8::internal 264 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/codegen.h ('k') | src/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698