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

Side by Side Diff: src/scopes.cc

Issue 9655025: Fix warning. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 988 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 #endif 999 #endif
1000 1000
1001 // Inconsistent use of module. Throw a syntax error. 1001 // Inconsistent use of module. Throw a syntax error.
1002 // TODO(rossberg): generate more helpful error message. 1002 // TODO(rossberg): generate more helpful error message.
1003 MessageLocation location(info->script(), 1003 MessageLocation location(info->script(),
1004 proxy->position(), 1004 proxy->position(),
1005 proxy->position()); 1005 proxy->position());
1006 Isolate* isolate = Isolate::Current(); 1006 Isolate* isolate = Isolate::Current();
1007 Factory* factory = isolate->factory(); 1007 Factory* factory = isolate->factory();
1008 Handle<JSArray> array = factory->NewJSArray(1); 1008 Handle<JSArray> array = factory->NewJSArray(1);
1009 array->SetElement(array, 0, var->name(), NONE, kStrictMode); 1009 USE(JSObject::SetElement(array, 0, var->name(), NONE, kStrictMode));
1010 Handle<Object> result = 1010 Handle<Object> result =
1011 factory->NewSyntaxError("module_type_error", array); 1011 factory->NewSyntaxError("module_type_error", array);
1012 isolate->Throw(*result, &location); 1012 isolate->Throw(*result, &location);
1013 return false; 1013 return false;
1014 } 1014 }
1015 } 1015 }
1016 1016
1017 return true; 1017 return true;
1018 } 1018 }
1019 1019
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
1250 } 1250 }
1251 1251
1252 1252
1253 int Scope::ContextLocalCount() const { 1253 int Scope::ContextLocalCount() const {
1254 if (num_heap_slots() == 0) return 0; 1254 if (num_heap_slots() == 0) return 0;
1255 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS - 1255 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS -
1256 (function_ != NULL && function_->var()->IsContextSlot() ? 1 : 0); 1256 (function_ != NULL && function_->var()->IsContextSlot() ? 1 : 0);
1257 } 1257 }
1258 1258
1259 } } // namespace v8::internal 1259 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698