| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 int column_offset, | 282 int column_offset, |
| 283 v8::Extension* extension, | 283 v8::Extension* extension, |
| 284 ScriptDataImpl* pre_data, | 284 ScriptDataImpl* pre_data, |
| 285 Handle<Object> script_data, | 285 Handle<Object> script_data, |
| 286 NativesFlag is_natives_code); | 286 NativesFlag is_natives_code); |
| 287 | 287 |
| 288 // Compile a String source within a context for Eval. | 288 // Compile a String source within a context for Eval. |
| 289 static Handle<SharedFunctionInfo> CompileEval(Handle<String> source, | 289 static Handle<SharedFunctionInfo> CompileEval(Handle<String> source, |
| 290 Handle<Context> context, | 290 Handle<Context> context, |
| 291 bool is_global, | 291 bool is_global, |
| 292 StrictModeFlag strict_mode); | 292 StrictModeFlag strict_mode, |
| 293 int scope_position); |
| 293 | 294 |
| 294 // Compile from function info (used for lazy compilation). Returns true on | 295 // Compile from function info (used for lazy compilation). Returns true on |
| 295 // success and false if the compilation resulted in a stack overflow. | 296 // success and false if the compilation resulted in a stack overflow. |
| 296 static bool CompileLazy(CompilationInfo* info); | 297 static bool CompileLazy(CompilationInfo* info); |
| 297 | 298 |
| 298 // Compile a shared function info object (the function is possibly lazily | 299 // Compile a shared function info object (the function is possibly lazily |
| 299 // compiled). | 300 // compiled). |
| 300 static Handle<SharedFunctionInfo> BuildFunctionInfo(FunctionLiteral* node, | 301 static Handle<SharedFunctionInfo> BuildFunctionInfo(FunctionLiteral* node, |
| 301 Handle<Script> script); | 302 Handle<Script> script); |
| 302 | 303 |
| 303 // Set the function info for a newly compiled function. | 304 // Set the function info for a newly compiled function. |
| 304 static void SetFunctionInfo(Handle<SharedFunctionInfo> function_info, | 305 static void SetFunctionInfo(Handle<SharedFunctionInfo> function_info, |
| 305 FunctionLiteral* lit, | 306 FunctionLiteral* lit, |
| 306 bool is_toplevel, | 307 bool is_toplevel, |
| 307 Handle<Script> script); | 308 Handle<Script> script); |
| 308 | 309 |
| 309 #ifdef ENABLE_DEBUGGER_SUPPORT | 310 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 310 static bool MakeCodeForLiveEdit(CompilationInfo* info); | 311 static bool MakeCodeForLiveEdit(CompilationInfo* info); |
| 311 #endif | 312 #endif |
| 312 | 313 |
| 313 static void RecordFunctionCompilation(Logger::LogEventsAndTags tag, | 314 static void RecordFunctionCompilation(Logger::LogEventsAndTags tag, |
| 314 CompilationInfo* info, | 315 CompilationInfo* info, |
| 315 Handle<SharedFunctionInfo> shared); | 316 Handle<SharedFunctionInfo> shared); |
| 316 }; | 317 }; |
| 317 | 318 |
| 318 | 319 |
| 319 } } // namespace v8::internal | 320 } } // namespace v8::internal |
| 320 | 321 |
| 321 #endif // V8_COMPILER_H_ | 322 #endif // V8_COMPILER_H_ |
| OLD | NEW |