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

Side by Side Diff: src/wasm/function-body-decoder.cc

Issue 2609363004: [asm.js] [wasm] Store function start position for stack check (Closed)
Patch Set: It's 2017 already :) Created 3 years, 11 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
« no previous file with comments | « src/runtime/runtime-test.cc ('k') | src/wasm/module-decoder.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/signature.h" 5 #include "src/signature.h"
6 6
7 #include "src/bit-vector.h" 7 #include "src/bit-vector.h"
8 #include "src/flags.h" 8 #include "src/flags.h"
9 #include "src/handles.h" 9 #include "src/handles.h"
10 #include "src/zone/zone-containers.h" 10 #include "src/zone/zone-containers.h"
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 local_type_vec_[index] == type) { 544 local_type_vec_[index] == type) {
545 // Do a whole run of like-typed locals at a time. 545 // Do a whole run of like-typed locals at a time.
546 ssa_env->locals[index++] = node; 546 ssa_env->locals[index++] = node;
547 } 547 }
548 } 548 }
549 } 549 }
550 ssa_env->control = start; 550 ssa_env->control = start;
551 ssa_env->effect = start; 551 ssa_env->effect = start;
552 SetEnv("initial", ssa_env); 552 SetEnv("initial", ssa_env);
553 if (builder_) { 553 if (builder_) {
554 builder_->StackCheck(position()); 554 // The function-prologue stack check is associated with position 0, which
555 // is never a position of any instruction in the function.
556 builder_->StackCheck(0);
555 } 557 }
556 } 558 }
557 559
558 TFNode* DefaultValue(ValueType type) { 560 TFNode* DefaultValue(ValueType type) {
559 switch (type) { 561 switch (type) {
560 case kWasmI32: 562 case kWasmI32:
561 return builder_->Int32Constant(0); 563 return builder_->Int32Constant(0);
562 case kWasmI64: 564 case kWasmI64:
563 return builder_->Int64Constant(0); 565 return builder_->Int64Constant(0);
564 case kWasmF32: 566 case kWasmF32:
(...skipping 1506 matching lines...) Expand 10 before | Expand all | Expand 10 after
2071 BitVector* AnalyzeLoopAssignmentForTesting(Zone* zone, size_t num_locals, 2073 BitVector* AnalyzeLoopAssignmentForTesting(Zone* zone, size_t num_locals,
2072 const byte* start, const byte* end) { 2074 const byte* start, const byte* end) {
2073 FunctionBody body = {nullptr, nullptr, start, end}; 2075 FunctionBody body = {nullptr, nullptr, start, end};
2074 WasmFullDecoder decoder(zone, body); 2076 WasmFullDecoder decoder(zone, body);
2075 return decoder.AnalyzeLoopAssignmentForTesting(start, num_locals); 2077 return decoder.AnalyzeLoopAssignmentForTesting(start, num_locals);
2076 } 2078 }
2077 2079
2078 } // namespace wasm 2080 } // namespace wasm
2079 } // namespace internal 2081 } // namespace internal
2080 } // namespace v8 2082 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime-test.cc ('k') | src/wasm/module-decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698