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

Side by Side Diff: test/cctest/compiler/test-codegen-deopt.cc

Issue 636403003: Assign bailout and type feedback IDs in a post-pass (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased 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 | « test/cctest/compiler/function-tester.h ('k') | test/cctest/compiler/test-pipeline.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #include "test/cctest/cctest.h" 6 #include "test/cctest/cctest.h"
7 7
8 #include "src/compiler/code-generator.h" 8 #include "src/compiler/code-generator.h"
9 #include "src/compiler/common-operator.h" 9 #include "src/compiler/common-operator.h"
10 #include "src/compiler/graph.h" 10 #include "src/compiler/graph.h"
11 #include "src/compiler/instruction-selector.h" 11 #include "src/compiler/instruction-selector.h"
12 #include "src/compiler/machine-operator.h" 12 #include "src/compiler/machine-operator.h"
13 #include "src/compiler/node.h" 13 #include "src/compiler/node.h"
14 #include "src/compiler/operator.h" 14 #include "src/compiler/operator.h"
15 #include "src/compiler/raw-machine-assembler.h" 15 #include "src/compiler/raw-machine-assembler.h"
16 #include "src/compiler/register-allocator.h" 16 #include "src/compiler/register-allocator.h"
17 #include "src/compiler/schedule.h" 17 #include "src/compiler/schedule.h"
18 18
19 #include "src/ast-numbering.h"
19 #include "src/full-codegen.h" 20 #include "src/full-codegen.h"
20 #include "src/parser.h" 21 #include "src/parser.h"
21 #include "src/rewriter.h" 22 #include "src/rewriter.h"
22 23
23 #include "test/cctest/compiler/c-signature.h" 24 #include "test/cctest/compiler/c-signature.h"
24 #include "test/cctest/compiler/function-tester.h" 25 #include "test/cctest/compiler/function-tester.h"
25 26
26 using namespace v8::internal; 27 using namespace v8::internal;
27 using namespace v8::internal::compiler; 28 using namespace v8::internal::compiler;
28 29
(...skipping 12 matching lines...) Expand all
41 public: 42 public:
42 explicit DeoptCodegenTester(HandleAndZoneScope* scope, const char* src) 43 explicit DeoptCodegenTester(HandleAndZoneScope* scope, const char* src)
43 : scope_(scope), 44 : scope_(scope),
44 function(NewFunction(src)), 45 function(NewFunction(src)),
45 info(function, scope->main_zone()), 46 info(function, scope->main_zone()),
46 bailout_id(-1) { 47 bailout_id(-1) {
47 CHECK(Parser::Parse(&info)); 48 CHECK(Parser::Parse(&info));
48 info.SetOptimizing(BailoutId::None(), Handle<Code>(function->code())); 49 info.SetOptimizing(BailoutId::None(), Handle<Code>(function->code()));
49 CHECK(Rewriter::Rewrite(&info)); 50 CHECK(Rewriter::Rewrite(&info));
50 CHECK(Scope::Analyze(&info)); 51 CHECK(Scope::Analyze(&info));
52 CHECK(AstNumbering::Renumber(info.function(), info.zone()));
51 CHECK(Compiler::EnsureDeoptimizationSupport(&info)); 53 CHECK(Compiler::EnsureDeoptimizationSupport(&info));
52 54
53 DCHECK(info.shared_info()->has_deoptimization_support()); 55 DCHECK(info.shared_info()->has_deoptimization_support());
54 56
55 graph = new (scope_->main_zone()) Graph(scope_->main_zone()); 57 graph = new (scope_->main_zone()) Graph(scope_->main_zone());
56 } 58 }
57 59
58 virtual ~DeoptCodegenTester() { delete code; } 60 virtual ~DeoptCodegenTester() { delete code; }
59 61
60 void GenerateCodeFromSchedule(Schedule* schedule) { 62 void GenerateCodeFromSchedule(Schedule* schedule) {
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 Handle<Object> result; 308 Handle<Object> result;
307 bool has_pending_exception = 309 bool has_pending_exception =
308 !Execution::Call(isolate, t.function, 310 !Execution::Call(isolate, t.function,
309 isolate->factory()->undefined_value(), 0, NULL, 311 isolate->factory()->undefined_value(), 0, NULL,
310 false).ToHandle(&result); 312 false).ToHandle(&result);
311 CHECK(!has_pending_exception); 313 CHECK(!has_pending_exception);
312 CHECK(result->SameValue(Smi::FromInt(42))); 314 CHECK(result->SameValue(Smi::FromInt(42)));
313 } 315 }
314 316
315 #endif 317 #endif
OLDNEW
« no previous file with comments | « test/cctest/compiler/function-tester.h ('k') | test/cctest/compiler/test-pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698