| OLD | NEW |
| 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/typing-asm.h" | 5 #include "src/typing-asm.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "src/v8.h" | 9 #include "src/v8.h" |
| 10 | 10 |
| 11 #include "src/ast/ast.h" | 11 #include "src/ast/ast.h" |
| 12 #include "src/ast/scopes.h" | 12 #include "src/ast/scopes.h" |
| 13 #include "src/codegen.h" | 13 #include "src/codegen.h" |
| 14 #include "src/type-cache.h" | 14 #include "src/type-cache.h" |
| 15 | 15 |
| 16 namespace v8 { | 16 namespace v8 { |
| 17 namespace internal { | 17 namespace internal { |
| 18 | 18 |
| 19 #define FAIL(node, msg) \ | 19 #define FAIL(node, msg) \ |
| 20 do { \ | 20 do { \ |
| 21 valid_ = false; \ | 21 valid_ = false; \ |
| 22 int line = node->position() == RelocInfo::kNoPosition \ | 22 int line = node->position() == kNoSourcePosition \ |
| 23 ? -1 \ | 23 ? -1 \ |
| 24 : script_->GetLineNumber(node->position()); \ | 24 : script_->GetLineNumber(node->position()); \ |
| 25 base::OS::SNPrintF(error_message_, sizeof(error_message_), \ | 25 base::OS::SNPrintF(error_message_, sizeof(error_message_), \ |
| 26 "asm: line %d: %s\n", line + 1, msg); \ | 26 "asm: line %d: %s\n", line + 1, msg); \ |
| 27 return; \ | 27 return; \ |
| 28 } while (false) | 28 } while (false) |
| 29 | 29 |
| 30 | |
| 31 #define RECURSE(call) \ | 30 #define RECURSE(call) \ |
| 32 do { \ | 31 do { \ |
| 33 DCHECK(!HasStackOverflow()); \ | 32 DCHECK(!HasStackOverflow()); \ |
| 34 call; \ | 33 call; \ |
| 35 if (HasStackOverflow()) return; \ | 34 if (HasStackOverflow()) return; \ |
| 36 if (!valid_) return; \ | 35 if (!valid_) return; \ |
| 37 } while (false) | 36 } while (false) |
| 38 | 37 |
| 39 AsmTyper::AsmTyper(Isolate* isolate, Zone* zone, Script* script, | 38 AsmTyper::AsmTyper(Isolate* isolate, Zone* zone, Script* script, |
| 40 FunctionLiteral* root) | 39 FunctionLiteral* root) |
| (...skipping 1620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1661 } | 1660 } |
| 1662 | 1661 |
| 1663 | 1662 |
| 1664 void AsmTyper::VisitRewritableExpression(RewritableExpression* expr) { | 1663 void AsmTyper::VisitRewritableExpression(RewritableExpression* expr) { |
| 1665 RECURSE(Visit(expr->expression())); | 1664 RECURSE(Visit(expr->expression())); |
| 1666 } | 1665 } |
| 1667 | 1666 |
| 1668 | 1667 |
| 1669 } // namespace internal | 1668 } // namespace internal |
| 1670 } // namespace v8 | 1669 } // namespace v8 |
| OLD | NEW |