| OLD | NEW |
| 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/ast.h" | 8 #include "src/ast.h" |
| 9 #include "src/base/platform/platform.h" | 9 #include "src/base/platform/platform.h" |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| (...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1113 scope_->SetStrictMode(STRICT); | 1113 scope_->SetStrictMode(STRICT); |
| 1114 // "use strict" is the only directive for now. | 1114 // "use strict" is the only directive for now. |
| 1115 directive_prologue = false; | 1115 directive_prologue = false; |
| 1116 } else if (literal->raw_value()->AsString() == | 1116 } else if (literal->raw_value()->AsString() == |
| 1117 ast_value_factory()->use_asm_string() && | 1117 ast_value_factory()->use_asm_string() && |
| 1118 token_loc.end_pos - token_loc.beg_pos == | 1118 token_loc.end_pos - token_loc.beg_pos == |
| 1119 ast_value_factory()->use_asm_string()->length() + 2) { | 1119 ast_value_factory()->use_asm_string()->length() + 2) { |
| 1120 // Store the usage count; The actual use counter on the isolate is | 1120 // Store the usage count; The actual use counter on the isolate is |
| 1121 // incremented after parsing is done. | 1121 // incremented after parsing is done. |
| 1122 ++use_counts_[v8::Isolate::kUseAsm]; | 1122 ++use_counts_[v8::Isolate::kUseAsm]; |
| 1123 scope_->SetAsmModule(); |
| 1123 } | 1124 } |
| 1124 } else { | 1125 } else { |
| 1125 // End of the directive prologue. | 1126 // End of the directive prologue. |
| 1126 directive_prologue = false; | 1127 directive_prologue = false; |
| 1127 } | 1128 } |
| 1128 } | 1129 } |
| 1129 | 1130 |
| 1130 processor->Add(stat, zone()); | 1131 processor->Add(stat, zone()); |
| 1131 } | 1132 } |
| 1132 | 1133 |
| (...skipping 3820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4953 | 4954 |
| 4954 // We cannot internalize on a background thread; a foreground task will take | 4955 // We cannot internalize on a background thread; a foreground task will take |
| 4955 // care of calling Parser::Internalize just before compilation. | 4956 // care of calling Parser::Internalize just before compilation. |
| 4956 | 4957 |
| 4957 if (compile_options() == ScriptCompiler::kProduceParserCache) { | 4958 if (compile_options() == ScriptCompiler::kProduceParserCache) { |
| 4958 if (result != NULL) *info_->cached_data() = recorder.GetScriptData(); | 4959 if (result != NULL) *info_->cached_data() = recorder.GetScriptData(); |
| 4959 log_ = NULL; | 4960 log_ = NULL; |
| 4960 } | 4961 } |
| 4961 } | 4962 } |
| 4962 } } // namespace v8::internal | 4963 } } // namespace v8::internal |
| OLD | NEW |