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

Side by Side Diff: src/compiler.cc

Issue 8508052: Static resolution of outer variables in eval code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments. Created 9 years, 1 month 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 | « src/compiler.h ('k') | src/contexts.h » ('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 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 namespace v8 { 50 namespace v8 {
51 namespace internal { 51 namespace internal {
52 52
53 53
54 CompilationInfo::CompilationInfo(Handle<Script> script) 54 CompilationInfo::CompilationInfo(Handle<Script> script)
55 : isolate_(script->GetIsolate()), 55 : isolate_(script->GetIsolate()),
56 flags_(0), 56 flags_(0),
57 function_(NULL), 57 function_(NULL),
58 scope_(NULL), 58 scope_(NULL),
59 global_scope_(NULL),
59 script_(script), 60 script_(script),
60 extension_(NULL), 61 extension_(NULL),
61 pre_parse_data_(NULL), 62 pre_parse_data_(NULL),
62 osr_ast_id_(AstNode::kNoNumber) { 63 osr_ast_id_(AstNode::kNoNumber) {
63 Initialize(NONOPT); 64 Initialize(NONOPT);
64 } 65 }
65 66
66 67
67 CompilationInfo::CompilationInfo(Handle<SharedFunctionInfo> shared_info) 68 CompilationInfo::CompilationInfo(Handle<SharedFunctionInfo> shared_info)
68 : isolate_(shared_info->GetIsolate()), 69 : isolate_(shared_info->GetIsolate()),
69 flags_(IsLazy::encode(true)), 70 flags_(IsLazy::encode(true)),
70 function_(NULL), 71 function_(NULL),
71 scope_(NULL), 72 scope_(NULL),
73 global_scope_(NULL),
72 shared_info_(shared_info), 74 shared_info_(shared_info),
73 script_(Handle<Script>(Script::cast(shared_info->script()))), 75 script_(Handle<Script>(Script::cast(shared_info->script()))),
74 extension_(NULL), 76 extension_(NULL),
75 pre_parse_data_(NULL), 77 pre_parse_data_(NULL),
76 osr_ast_id_(AstNode::kNoNumber) { 78 osr_ast_id_(AstNode::kNoNumber) {
77 Initialize(BASE); 79 Initialize(BASE);
78 } 80 }
79 81
80 82
81 CompilationInfo::CompilationInfo(Handle<JSFunction> closure) 83 CompilationInfo::CompilationInfo(Handle<JSFunction> closure)
82 : isolate_(closure->GetIsolate()), 84 : isolate_(closure->GetIsolate()),
83 flags_(IsLazy::encode(true)), 85 flags_(IsLazy::encode(true)),
84 function_(NULL), 86 function_(NULL),
85 scope_(NULL), 87 scope_(NULL),
88 global_scope_(NULL),
86 closure_(closure), 89 closure_(closure),
87 shared_info_(Handle<SharedFunctionInfo>(closure->shared())), 90 shared_info_(Handle<SharedFunctionInfo>(closure->shared())),
88 script_(Handle<Script>(Script::cast(shared_info_->script()))), 91 script_(Handle<Script>(Script::cast(shared_info_->script()))),
89 extension_(NULL), 92 extension_(NULL),
90 pre_parse_data_(NULL), 93 pre_parse_data_(NULL),
91 osr_ast_id_(AstNode::kNoNumber) { 94 osr_ast_id_(AstNode::kNoNumber) {
92 Initialize(BASE); 95 Initialize(BASE);
93 } 96 }
94 97
95 98
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 } 792 }
790 } 793 }
791 794
792 GDBJIT(AddCode(Handle<String>(shared->DebugName()), 795 GDBJIT(AddCode(Handle<String>(shared->DebugName()),
793 Handle<Script>(info->script()), 796 Handle<Script>(info->script()),
794 Handle<Code>(info->code()), 797 Handle<Code>(info->code()),
795 info)); 798 info));
796 } 799 }
797 800
798 } } // namespace v8::internal 801 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/compiler.h ('k') | src/contexts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698