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

Side by Side Diff: src/scopes.cc

Issue 101763003: Replace 'operator*' with explicit 'get' method on SmartPointer (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Reupload to make rietveld happy Created 7 years 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/runtime.cc ('k') | src/smart-pointers.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 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 782 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 } 793 }
794 794
795 795
796 static void Indent(int n, const char* str) { 796 static void Indent(int n, const char* str) {
797 PrintF("%*s%s", n, "", str); 797 PrintF("%*s%s", n, "", str);
798 } 798 }
799 799
800 800
801 static void PrintName(Handle<String> name) { 801 static void PrintName(Handle<String> name) {
802 SmartArrayPointer<char> s = name->ToCString(DISALLOW_NULLS); 802 SmartArrayPointer<char> s = name->ToCString(DISALLOW_NULLS);
803 PrintF("%s", *s); 803 PrintF("%s", s.get());
804 } 804 }
805 805
806 806
807 static void PrintLocation(Variable* var) { 807 static void PrintLocation(Variable* var) {
808 switch (var->location()) { 808 switch (var->location()) {
809 case Variable::UNALLOCATED: 809 case Variable::UNALLOCATED:
810 break; 810 break;
811 case Variable::PARAMETER: 811 case Variable::PARAMETER:
812 PrintF("parameter[%d]", var->index()); 812 PrintF("parameter[%d]", var->index());
813 break; 813 break;
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
1405 } 1405 }
1406 1406
1407 1407
1408 int Scope::ContextLocalCount() const { 1408 int Scope::ContextLocalCount() const {
1409 if (num_heap_slots() == 0) return 0; 1409 if (num_heap_slots() == 0) return 0;
1410 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS - 1410 return num_heap_slots() - Context::MIN_CONTEXT_SLOTS -
1411 (function_ != NULL && function_->proxy()->var()->IsContextSlot() ? 1 : 0); 1411 (function_ != NULL && function_->proxy()->var()->IsContextSlot() ? 1 : 0);
1412 } 1412 }
1413 1413
1414 } } // namespace v8::internal 1414 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | src/smart-pointers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698